mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e04f316d6434a50d/out/
development.rs

1#![doc = "MAVLink development dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 0u8;
25pub const DIALECT_NUMBER: u8 = 0u8;
26#[cfg_attr(feature = "ts", derive(TS))]
27#[cfg_attr(feature = "ts", ts(export))]
28#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "serde", serde(tag = "type"))]
31#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32#[repr(u32)]
33#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
34pub enum ActuatorConfiguration {
35    #[doc = "Do nothing."]
36    ACTUATOR_CONFIGURATION_NONE = 0,
37    #[doc = "Command the actuator to beep now."]
38    ACTUATOR_CONFIGURATION_BEEP = 1,
39    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
41    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
42    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
45    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
46    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
47}
48impl ActuatorConfiguration {
49    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
50}
51impl Default for ActuatorConfiguration {
52    fn default() -> Self {
53        Self::DEFAULT
54    }
55}
56#[cfg_attr(feature = "ts", derive(TS))]
57#[cfg_attr(feature = "ts", ts(export))]
58#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
59#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
60#[cfg_attr(feature = "serde", serde(tag = "type"))]
61#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
62#[repr(u32)]
63#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
64pub enum ActuatorOutputFunction {
65    #[doc = "No function (disabled)."]
66    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
67    #[doc = "Motor 1"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
69    #[doc = "Motor 2"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
71    #[doc = "Motor 3"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
73    #[doc = "Motor 4"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
75    #[doc = "Motor 5"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
77    #[doc = "Motor 6"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
79    #[doc = "Motor 7"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
81    #[doc = "Motor 8"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
83    #[doc = "Motor 9"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
85    #[doc = "Motor 10"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
87    #[doc = "Motor 11"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
89    #[doc = "Motor 12"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
91    #[doc = "Motor 13"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
93    #[doc = "Motor 14"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
95    #[doc = "Motor 15"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
97    #[doc = "Motor 16"]
98    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
99    #[doc = "Servo 1"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
101    #[doc = "Servo 2"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
103    #[doc = "Servo 3"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
105    #[doc = "Servo 4"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
107    #[doc = "Servo 5"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
109    #[doc = "Servo 6"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
111    #[doc = "Servo 7"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
113    #[doc = "Servo 8"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
115    #[doc = "Servo 9"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
117    #[doc = "Servo 10"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
119    #[doc = "Servo 11"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
121    #[doc = "Servo 12"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
123    #[doc = "Servo 13"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
125    #[doc = "Servo 14"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
127    #[doc = "Servo 15"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
129    #[doc = "Servo 16"]
130    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
131}
132impl ActuatorOutputFunction {
133    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
134}
135impl Default for ActuatorOutputFunction {
136    fn default() -> Self {
137        Self::DEFAULT
138    }
139}
140#[cfg_attr(feature = "ts", derive(TS))]
141#[cfg_attr(feature = "ts", ts(export))]
142#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
144#[cfg_attr(feature = "serde", serde(tag = "type"))]
145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
146#[repr(u32)]
147#[doc = "Enumeration of the ADSB altimeter types"]
148pub enum AdsbAltitudeType {
149    #[doc = "Altitude reported from a Baro source using QNH reference"]
150    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
151    #[doc = "Altitude reported from a GNSS source"]
152    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
153}
154impl AdsbAltitudeType {
155    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
156}
157impl Default for AdsbAltitudeType {
158    fn default() -> Self {
159        Self::DEFAULT
160    }
161}
162#[cfg_attr(feature = "ts", derive(TS))]
163#[cfg_attr(feature = "ts", ts(export))]
164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
166#[cfg_attr(feature = "serde", serde(tag = "type"))]
167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
168#[repr(u32)]
169#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
170pub enum AdsbEmitterType {
171    ADSB_EMITTER_TYPE_NO_INFO = 0,
172    ADSB_EMITTER_TYPE_LIGHT = 1,
173    ADSB_EMITTER_TYPE_SMALL = 2,
174    ADSB_EMITTER_TYPE_LARGE = 3,
175    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
176    ADSB_EMITTER_TYPE_HEAVY = 5,
177    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
178    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
179    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
180    ADSB_EMITTER_TYPE_GLIDER = 9,
181    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
182    ADSB_EMITTER_TYPE_PARACHUTE = 11,
183    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
184    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
185    ADSB_EMITTER_TYPE_UAV = 14,
186    ADSB_EMITTER_TYPE_SPACE = 15,
187    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
188    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
189    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
190    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
191}
192impl AdsbEmitterType {
193    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
194}
195impl Default for AdsbEmitterType {
196    fn default() -> Self {
197        Self::DEFAULT
198    }
199}
200bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
201impl AdsbFlags {
202    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
203}
204impl Default for AdsbFlags {
205    fn default() -> Self {
206        Self::DEFAULT
207    }
208}
209bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Airspeed sensor flags"] pub struct AirspeedSensorFlags : u8 { # [doc = "Airspeed sensor is unhealthy"] const AIRSPEED_SENSOR_UNHEALTHY = 1 ; # [doc = "True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control."] const AIRSPEED_SENSOR_USING = 2 ; } }
210impl AirspeedSensorFlags {
211    pub const DEFAULT: Self = Self::AIRSPEED_SENSOR_UNHEALTHY;
212}
213impl Default for AirspeedSensorFlags {
214    fn default() -> Self {
215        Self::DEFAULT
216    }
217}
218bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
219impl AisFlags {
220    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
221}
222impl Default for AisFlags {
223    fn default() -> Self {
224        Self::DEFAULT
225    }
226}
227#[cfg_attr(feature = "ts", derive(TS))]
228#[cfg_attr(feature = "ts", ts(export))]
229#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
231#[cfg_attr(feature = "serde", serde(tag = "type"))]
232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
233#[repr(u32)]
234#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
235pub enum AisNavStatus {
236    #[doc = "Under way using engine."]
237    UNDER_WAY = 0,
238    AIS_NAV_ANCHORED = 1,
239    AIS_NAV_UN_COMMANDED = 2,
240    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
241    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
242    AIS_NAV_MOORED = 5,
243    AIS_NAV_AGROUND = 6,
244    AIS_NAV_FISHING = 7,
245    AIS_NAV_SAILING = 8,
246    AIS_NAV_RESERVED_HSC = 9,
247    AIS_NAV_RESERVED_WIG = 10,
248    AIS_NAV_RESERVED_1 = 11,
249    AIS_NAV_RESERVED_2 = 12,
250    AIS_NAV_RESERVED_3 = 13,
251    #[doc = "Search And Rescue Transponder."]
252    AIS_NAV_AIS_SART = 14,
253    #[doc = "Not available (default)."]
254    AIS_NAV_UNKNOWN = 15,
255}
256impl AisNavStatus {
257    pub const DEFAULT: Self = Self::UNDER_WAY;
258}
259impl Default for AisNavStatus {
260    fn default() -> Self {
261        Self::DEFAULT
262    }
263}
264#[cfg_attr(feature = "ts", derive(TS))]
265#[cfg_attr(feature = "ts", ts(export))]
266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
268#[cfg_attr(feature = "serde", serde(tag = "type"))]
269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
270#[repr(u32)]
271#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
272pub enum AisType {
273    #[doc = "Not available (default)."]
274    AIS_TYPE_UNKNOWN = 0,
275    AIS_TYPE_RESERVED_1 = 1,
276    AIS_TYPE_RESERVED_2 = 2,
277    AIS_TYPE_RESERVED_3 = 3,
278    AIS_TYPE_RESERVED_4 = 4,
279    AIS_TYPE_RESERVED_5 = 5,
280    AIS_TYPE_RESERVED_6 = 6,
281    AIS_TYPE_RESERVED_7 = 7,
282    AIS_TYPE_RESERVED_8 = 8,
283    AIS_TYPE_RESERVED_9 = 9,
284    AIS_TYPE_RESERVED_10 = 10,
285    AIS_TYPE_RESERVED_11 = 11,
286    AIS_TYPE_RESERVED_12 = 12,
287    AIS_TYPE_RESERVED_13 = 13,
288    AIS_TYPE_RESERVED_14 = 14,
289    AIS_TYPE_RESERVED_15 = 15,
290    AIS_TYPE_RESERVED_16 = 16,
291    AIS_TYPE_RESERVED_17 = 17,
292    AIS_TYPE_RESERVED_18 = 18,
293    AIS_TYPE_RESERVED_19 = 19,
294    #[doc = "Wing In Ground effect."]
295    AIS_TYPE_WIG = 20,
296    AIS_TYPE_WIG_HAZARDOUS_A = 21,
297    AIS_TYPE_WIG_HAZARDOUS_B = 22,
298    AIS_TYPE_WIG_HAZARDOUS_C = 23,
299    AIS_TYPE_WIG_HAZARDOUS_D = 24,
300    AIS_TYPE_WIG_RESERVED_1 = 25,
301    AIS_TYPE_WIG_RESERVED_2 = 26,
302    AIS_TYPE_WIG_RESERVED_3 = 27,
303    AIS_TYPE_WIG_RESERVED_4 = 28,
304    AIS_TYPE_WIG_RESERVED_5 = 29,
305    AIS_TYPE_FISHING = 30,
306    AIS_TYPE_TOWING = 31,
307    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
308    AIS_TYPE_TOWING_LARGE = 32,
309    #[doc = "Dredging or other underwater ops."]
310    AIS_TYPE_DREDGING = 33,
311    AIS_TYPE_DIVING = 34,
312    AIS_TYPE_MILITARY = 35,
313    AIS_TYPE_SAILING = 36,
314    AIS_TYPE_PLEASURE = 37,
315    AIS_TYPE_RESERVED_20 = 38,
316    AIS_TYPE_RESERVED_21 = 39,
317    #[doc = "High Speed Craft."]
318    AIS_TYPE_HSC = 40,
319    AIS_TYPE_HSC_HAZARDOUS_A = 41,
320    AIS_TYPE_HSC_HAZARDOUS_B = 42,
321    AIS_TYPE_HSC_HAZARDOUS_C = 43,
322    AIS_TYPE_HSC_HAZARDOUS_D = 44,
323    AIS_TYPE_HSC_RESERVED_1 = 45,
324    AIS_TYPE_HSC_RESERVED_2 = 46,
325    AIS_TYPE_HSC_RESERVED_3 = 47,
326    AIS_TYPE_HSC_RESERVED_4 = 48,
327    AIS_TYPE_HSC_UNKNOWN = 49,
328    AIS_TYPE_PILOT = 50,
329    #[doc = "Search And Rescue vessel."]
330    AIS_TYPE_SAR = 51,
331    AIS_TYPE_TUG = 52,
332    AIS_TYPE_PORT_TENDER = 53,
333    #[doc = "Anti-pollution equipment."]
334    AIS_TYPE_ANTI_POLLUTION = 54,
335    AIS_TYPE_LAW_ENFORCEMENT = 55,
336    AIS_TYPE_SPARE_LOCAL_1 = 56,
337    AIS_TYPE_SPARE_LOCAL_2 = 57,
338    AIS_TYPE_MEDICAL_TRANSPORT = 58,
339    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
340    AIS_TYPE_NONECOMBATANT = 59,
341    AIS_TYPE_PASSENGER = 60,
342    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
343    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
344    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
345    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
346    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
347    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
348    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
349    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
350    AIS_TYPE_PASSENGER_UNKNOWN = 69,
351    AIS_TYPE_CARGO = 70,
352    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
353    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
354    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
355    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
356    AIS_TYPE_CARGO_RESERVED_1 = 75,
357    AIS_TYPE_CARGO_RESERVED_2 = 76,
358    AIS_TYPE_CARGO_RESERVED_3 = 77,
359    AIS_TYPE_CARGO_RESERVED_4 = 78,
360    AIS_TYPE_CARGO_UNKNOWN = 79,
361    AIS_TYPE_TANKER = 80,
362    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
363    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
364    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
365    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
366    AIS_TYPE_TANKER_RESERVED_1 = 85,
367    AIS_TYPE_TANKER_RESERVED_2 = 86,
368    AIS_TYPE_TANKER_RESERVED_3 = 87,
369    AIS_TYPE_TANKER_RESERVED_4 = 88,
370    AIS_TYPE_TANKER_UNKNOWN = 89,
371    AIS_TYPE_OTHER = 90,
372    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
373    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
374    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
375    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
376    AIS_TYPE_OTHER_RESERVED_1 = 95,
377    AIS_TYPE_OTHER_RESERVED_2 = 96,
378    AIS_TYPE_OTHER_RESERVED_3 = 97,
379    AIS_TYPE_OTHER_RESERVED_4 = 98,
380    AIS_TYPE_OTHER_UNKNOWN = 99,
381}
382impl AisType {
383    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
384}
385impl Default for AisType {
386    fn default() -> Self {
387        Self::DEFAULT
388    }
389}
390bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
391impl AttitudeTargetTypemask {
392    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
393}
394impl Default for AttitudeTargetTypemask {
395    fn default() -> Self {
396        Self::DEFAULT
397    }
398}
399#[cfg_attr(feature = "ts", derive(TS))]
400#[cfg_attr(feature = "ts", ts(export))]
401#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
403#[cfg_attr(feature = "serde", serde(tag = "type"))]
404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
405#[repr(u32)]
406#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
407pub enum AutotuneAxis {
408    #[doc = "Autotune roll axis."]
409    AUTOTUNE_AXIS_ROLL = 1,
410    #[doc = "Autotune pitch axis."]
411    AUTOTUNE_AXIS_PITCH = 2,
412    #[doc = "Autotune yaw axis."]
413    AUTOTUNE_AXIS_YAW = 4,
414}
415impl AutotuneAxis {
416    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
417}
418impl Default for AutotuneAxis {
419    fn default() -> Self {
420        Self::DEFAULT
421    }
422}
423bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
424impl CameraCapFlags {
425    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
426}
427impl Default for CameraCapFlags {
428    fn default() -> Self {
429        Self::DEFAULT
430    }
431}
432#[cfg_attr(feature = "ts", derive(TS))]
433#[cfg_attr(feature = "ts", ts(export))]
434#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
436#[cfg_attr(feature = "serde", serde(tag = "type"))]
437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
438#[repr(u32)]
439#[doc = "Camera Modes."]
440pub enum CameraMode {
441    #[doc = "Camera is in image/photo capture mode."]
442    CAMERA_MODE_IMAGE = 0,
443    #[doc = "Camera is in video capture mode."]
444    CAMERA_MODE_VIDEO = 1,
445    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
446    CAMERA_MODE_IMAGE_SURVEY = 2,
447}
448impl CameraMode {
449    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
450}
451impl Default for CameraMode {
452    fn default() -> Self {
453        Self::DEFAULT
454    }
455}
456#[cfg_attr(feature = "ts", derive(TS))]
457#[cfg_attr(feature = "ts", ts(export))]
458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
460#[cfg_attr(feature = "serde", serde(tag = "type"))]
461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
462#[repr(u32)]
463#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
464pub enum CameraSource {
465    #[doc = "Default camera source."]
466    CAMERA_SOURCE_DEFAULT = 0,
467    #[doc = "RGB camera source."]
468    CAMERA_SOURCE_RGB = 1,
469    #[doc = "IR camera source."]
470    CAMERA_SOURCE_IR = 2,
471    #[doc = "NDVI camera source."]
472    CAMERA_SOURCE_NDVI = 3,
473}
474impl CameraSource {
475    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
476}
477impl Default for CameraSource {
478    fn default() -> Self {
479        Self::DEFAULT
480    }
481}
482#[cfg_attr(feature = "ts", derive(TS))]
483#[cfg_attr(feature = "ts", ts(export))]
484#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
486#[cfg_attr(feature = "serde", serde(tag = "type"))]
487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
488#[repr(u32)]
489#[doc = "Camera tracking modes"]
490pub enum CameraTrackingMode {
491    #[doc = "Not tracking"]
492    CAMERA_TRACKING_MODE_NONE = 0,
493    #[doc = "Target is a point"]
494    CAMERA_TRACKING_MODE_POINT = 1,
495    #[doc = "Target is a rectangle"]
496    CAMERA_TRACKING_MODE_RECTANGLE = 2,
497}
498impl CameraTrackingMode {
499    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
500}
501impl Default for CameraTrackingMode {
502    fn default() -> Self {
503        Self::DEFAULT
504    }
505}
506#[cfg_attr(feature = "ts", derive(TS))]
507#[cfg_attr(feature = "ts", ts(export))]
508#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
510#[cfg_attr(feature = "serde", serde(tag = "type"))]
511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
512#[repr(u32)]
513#[doc = "Camera tracking status flags"]
514pub enum CameraTrackingStatusFlags {
515    #[doc = "Camera is not tracking"]
516    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
517    #[doc = "Camera is tracking"]
518    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
519    #[doc = "Camera tracking in error state"]
520    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
521}
522impl CameraTrackingStatusFlags {
523    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
524}
525impl Default for CameraTrackingStatusFlags {
526    fn default() -> Self {
527        Self::DEFAULT
528    }
529}
530bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
531impl CameraTrackingTargetData {
532    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
533}
534impl Default for CameraTrackingTargetData {
535    fn default() -> Self {
536        Self::DEFAULT
537    }
538}
539#[cfg_attr(feature = "ts", derive(TS))]
540#[cfg_attr(feature = "ts", ts(export))]
541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
543#[cfg_attr(feature = "serde", serde(tag = "type"))]
544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
545#[repr(u32)]
546#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
547pub enum CameraZoomType {
548    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
549    ZOOM_TYPE_STEP = 0,
550    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
551    ZOOM_TYPE_CONTINUOUS = 1,
552    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
553    ZOOM_TYPE_RANGE = 2,
554    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
555    ZOOM_TYPE_FOCAL_LENGTH = 3,
556    #[doc = "Zoom value as horizontal field of view in degrees."]
557    ZOOM_TYPE_HORIZONTAL_FOV = 4,
558}
559impl CameraZoomType {
560    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
561}
562impl Default for CameraZoomType {
563    fn default() -> Self {
564        Self::DEFAULT
565    }
566}
567#[cfg_attr(feature = "ts", derive(TS))]
568#[cfg_attr(feature = "ts", ts(export))]
569#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
571#[cfg_attr(feature = "serde", serde(tag = "type"))]
572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
573#[repr(u32)]
574pub enum CanFilterOp {
575    CAN_FILTER_REPLACE = 0,
576    CAN_FILTER_ADD = 1,
577    CAN_FILTER_REMOVE = 2,
578}
579impl CanFilterOp {
580    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
581}
582impl Default for CanFilterOp {
583    fn default() -> Self {
584        Self::DEFAULT
585    }
586}
587#[cfg_attr(feature = "ts", derive(TS))]
588#[cfg_attr(feature = "ts", ts(export))]
589#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
591#[cfg_attr(feature = "serde", serde(tag = "type"))]
592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
593#[repr(u32)]
594#[doc = "Possible responses from a CELLULAR_CONFIG message."]
595pub enum CellularConfigResponse {
596    #[doc = "Changes accepted."]
597    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
598    #[doc = "Invalid APN."]
599    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
600    #[doc = "Invalid PIN."]
601    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
602    #[doc = "Changes rejected."]
603    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
604    #[doc = "PUK is required to unblock SIM card."]
605    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
606}
607impl CellularConfigResponse {
608    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
609}
610impl Default for CellularConfigResponse {
611    fn default() -> Self {
612        Self::DEFAULT
613    }
614}
615#[cfg_attr(feature = "ts", derive(TS))]
616#[cfg_attr(feature = "ts", ts(export))]
617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
619#[cfg_attr(feature = "serde", serde(tag = "type"))]
620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
621#[repr(u32)]
622#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
623pub enum CellularNetworkFailedReason {
624    #[doc = "No error"]
625    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
626    #[doc = "Error state is unknown"]
627    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
628    #[doc = "SIM is required for the modem but missing"]
629    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
630    #[doc = "SIM is available, but not usable for connection"]
631    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
632}
633impl CellularNetworkFailedReason {
634    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
635}
636impl Default for CellularNetworkFailedReason {
637    fn default() -> Self {
638        Self::DEFAULT
639    }
640}
641#[cfg_attr(feature = "ts", derive(TS))]
642#[cfg_attr(feature = "ts", ts(export))]
643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
645#[cfg_attr(feature = "serde", serde(tag = "type"))]
646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
647#[repr(u32)]
648#[doc = "Cellular network radio type"]
649pub enum CellularNetworkRadioType {
650    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
651    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
652    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
653    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
654    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
655}
656impl CellularNetworkRadioType {
657    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
658}
659impl Default for CellularNetworkRadioType {
660    fn default() -> Self {
661        Self::DEFAULT
662    }
663}
664#[cfg_attr(feature = "ts", derive(TS))]
665#[cfg_attr(feature = "ts", ts(export))]
666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
668#[cfg_attr(feature = "serde", serde(tag = "type"))]
669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
670#[repr(u32)]
671#[doc = "These flags encode the cellular network status"]
672pub enum CellularStatusFlag {
673    #[doc = "State unknown or not reportable."]
674    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
675    #[doc = "Modem is unusable"]
676    CELLULAR_STATUS_FLAG_FAILED = 1,
677    #[doc = "Modem is being initialized"]
678    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
679    #[doc = "Modem is locked"]
680    CELLULAR_STATUS_FLAG_LOCKED = 3,
681    #[doc = "Modem is not enabled and is powered down"]
682    CELLULAR_STATUS_FLAG_DISABLED = 4,
683    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
684    CELLULAR_STATUS_FLAG_DISABLING = 5,
685    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
686    CELLULAR_STATUS_FLAG_ENABLING = 6,
687    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
688    CELLULAR_STATUS_FLAG_ENABLED = 7,
689    #[doc = "Modem is searching for a network provider to register"]
690    CELLULAR_STATUS_FLAG_SEARCHING = 8,
691    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
692    CELLULAR_STATUS_FLAG_REGISTERED = 9,
693    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
694    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
695    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
696    CELLULAR_STATUS_FLAG_CONNECTING = 11,
697    #[doc = "One or more packet data bearers is active and connected"]
698    CELLULAR_STATUS_FLAG_CONNECTED = 12,
699}
700impl CellularStatusFlag {
701    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
702}
703impl Default for CellularStatusFlag {
704    fn default() -> Self {
705        Self::DEFAULT
706    }
707}
708#[cfg_attr(feature = "ts", derive(TS))]
709#[cfg_attr(feature = "ts", ts(export))]
710#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
712#[cfg_attr(feature = "serde", serde(tag = "type"))]
713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
714#[repr(u32)]
715#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
716pub enum CompMetadataType {
717    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
718    COMP_METADATA_TYPE_GENERAL = 0,
719    #[doc = "Parameter meta data."]
720    COMP_METADATA_TYPE_PARAMETER = 1,
721    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
722    COMP_METADATA_TYPE_COMMANDS = 2,
723    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
724    COMP_METADATA_TYPE_PERIPHERALS = 3,
725    #[doc = "Meta data for the events interface."]
726    COMP_METADATA_TYPE_EVENTS = 4,
727    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
728    COMP_METADATA_TYPE_ACTUATORS = 5,
729}
730impl CompMetadataType {
731    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
732}
733impl Default for CompMetadataType {
734    fn default() -> Self {
735        Self::DEFAULT
736    }
737}
738#[cfg_attr(feature = "ts", derive(TS))]
739#[cfg_attr(feature = "ts", ts(export))]
740#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
742#[cfg_attr(feature = "serde", serde(tag = "type"))]
743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
744#[repr(u32)]
745#[doc = "Indicates the ESC connection type."]
746pub enum EscConnectionType {
747    #[doc = "Traditional PPM ESC."]
748    ESC_CONNECTION_TYPE_PPM = 0,
749    #[doc = "Serial Bus connected ESC."]
750    ESC_CONNECTION_TYPE_SERIAL = 1,
751    #[doc = "One Shot PPM ESC."]
752    ESC_CONNECTION_TYPE_ONESHOT = 2,
753    #[doc = "I2C ESC."]
754    ESC_CONNECTION_TYPE_I2C = 3,
755    #[doc = "CAN-Bus ESC."]
756    ESC_CONNECTION_TYPE_CAN = 4,
757    #[doc = "DShot ESC."]
758    ESC_CONNECTION_TYPE_DSHOT = 5,
759}
760impl EscConnectionType {
761    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
762}
763impl Default for EscConnectionType {
764    fn default() -> Self {
765        Self::DEFAULT
766    }
767}
768bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
769impl EscFailureFlags {
770    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
771}
772impl Default for EscFailureFlags {
773    fn default() -> Self {
774        Self::DEFAULT
775    }
776}
777bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
778impl EstimatorStatusFlags {
779    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
780}
781impl Default for EstimatorStatusFlags {
782    fn default() -> Self {
783        Self::DEFAULT
784    }
785}
786#[cfg_attr(feature = "ts", derive(TS))]
787#[cfg_attr(feature = "ts", ts(export))]
788#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
790#[cfg_attr(feature = "serde", serde(tag = "type"))]
791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
792#[repr(u32)]
793#[doc = "List of possible failure type to inject."]
794pub enum FailureType {
795    #[doc = "No failure injected, used to reset a previous failure."]
796    FAILURE_TYPE_OK = 0,
797    #[doc = "Sets unit off, so completely non-responsive."]
798    FAILURE_TYPE_OFF = 1,
799    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
800    FAILURE_TYPE_STUCK = 2,
801    #[doc = "Unit is reporting complete garbage."]
802    FAILURE_TYPE_GARBAGE = 3,
803    #[doc = "Unit is consistently wrong."]
804    FAILURE_TYPE_WRONG = 4,
805    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
806    FAILURE_TYPE_SLOW = 5,
807    #[doc = "Data of unit is delayed in time."]
808    FAILURE_TYPE_DELAYED = 6,
809    #[doc = "Unit is sometimes working, sometimes not."]
810    FAILURE_TYPE_INTERMITTENT = 7,
811}
812impl FailureType {
813    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
814}
815impl Default for FailureType {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[cfg_attr(feature = "ts", derive(TS))]
821#[cfg_attr(feature = "ts", ts(export))]
822#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
824#[cfg_attr(feature = "serde", serde(tag = "type"))]
825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
826#[repr(u32)]
827#[doc = "List of possible units where failures can be injected."]
828pub enum FailureUnit {
829    FAILURE_UNIT_SENSOR_GYRO = 0,
830    FAILURE_UNIT_SENSOR_ACCEL = 1,
831    FAILURE_UNIT_SENSOR_MAG = 2,
832    FAILURE_UNIT_SENSOR_BARO = 3,
833    FAILURE_UNIT_SENSOR_GPS = 4,
834    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
835    FAILURE_UNIT_SENSOR_VIO = 6,
836    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
837    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
838    FAILURE_UNIT_SYSTEM_BATTERY = 100,
839    FAILURE_UNIT_SYSTEM_MOTOR = 101,
840    FAILURE_UNIT_SYSTEM_SERVO = 102,
841    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
842    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
843    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
844}
845impl FailureUnit {
846    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
847}
848impl Default for FailureUnit {
849    fn default() -> Self {
850        Self::DEFAULT
851    }
852}
853#[cfg_attr(feature = "ts", derive(TS))]
854#[cfg_attr(feature = "ts", ts(export))]
855#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
857#[cfg_attr(feature = "serde", serde(tag = "type"))]
858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
859#[repr(u32)]
860pub enum FenceBreach {
861    #[doc = "No last fence breach"]
862    FENCE_BREACH_NONE = 0,
863    #[doc = "Breached minimum altitude"]
864    FENCE_BREACH_MINALT = 1,
865    #[doc = "Breached maximum altitude"]
866    FENCE_BREACH_MAXALT = 2,
867    #[doc = "Breached fence boundary"]
868    FENCE_BREACH_BOUNDARY = 3,
869}
870impl FenceBreach {
871    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
872}
873impl Default for FenceBreach {
874    fn default() -> Self {
875        Self::DEFAULT
876    }
877}
878#[cfg_attr(feature = "ts", derive(TS))]
879#[cfg_attr(feature = "ts", ts(export))]
880#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
882#[cfg_attr(feature = "serde", serde(tag = "type"))]
883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
884#[repr(u32)]
885#[doc = "Actions being taken to mitigate/prevent fence breach"]
886pub enum FenceMitigate {
887    #[doc = "Unknown"]
888    FENCE_MITIGATE_UNKNOWN = 0,
889    #[doc = "No actions being taken"]
890    FENCE_MITIGATE_NONE = 1,
891    #[doc = "Velocity limiting active to prevent breach"]
892    FENCE_MITIGATE_VEL_LIMIT = 2,
893}
894impl FenceMitigate {
895    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
896}
897impl Default for FenceMitigate {
898    fn default() -> Self {
899        Self::DEFAULT
900    }
901}
902#[cfg_attr(feature = "ts", derive(TS))]
903#[cfg_attr(feature = "ts", ts(export))]
904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
906#[cfg_attr(feature = "serde", serde(tag = "type"))]
907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
908#[repr(u32)]
909#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
910pub enum FenceType {
911    #[doc = "Maximum altitude fence"]
912    FENCE_TYPE_ALT_MAX = 1,
913    #[doc = "Circle fence"]
914    FENCE_TYPE_CIRCLE = 2,
915    #[doc = "Polygon fence"]
916    FENCE_TYPE_POLYGON = 4,
917    #[doc = "Minimum altitude fence"]
918    FENCE_TYPE_ALT_MIN = 8,
919}
920impl FenceType {
921    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
922}
923impl Default for FenceType {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928#[cfg_attr(feature = "ts", derive(TS))]
929#[cfg_attr(feature = "ts", ts(export))]
930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
932#[cfg_attr(feature = "serde", serde(tag = "type"))]
933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
934#[repr(u32)]
935#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
936pub enum FirmwareVersionType {
937    #[doc = "development release"]
938    FIRMWARE_VERSION_TYPE_DEV = 0,
939    #[doc = "alpha release"]
940    FIRMWARE_VERSION_TYPE_ALPHA = 64,
941    #[doc = "beta release"]
942    FIRMWARE_VERSION_TYPE_BETA = 128,
943    #[doc = "release candidate"]
944    FIRMWARE_VERSION_TYPE_RC = 192,
945    #[doc = "official stable release"]
946    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
947}
948impl FirmwareVersionType {
949    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
950}
951impl Default for FirmwareVersionType {
952    fn default() -> Self {
953        Self::DEFAULT
954    }
955}
956bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "CONTROL_STATUS flags."] pub struct GcsControlStatusFlags : u8 { # [doc = "If set, this CONTROL_STATUS publishes the controlling GCS for the whole system. If unset, the CONTROL_STATUS indicates the controlling GCS for just the component emitting the message. Note that to request control of the system a GCS should send MAV_CMD_REQUEST_OPERATOR_CONTROL to the component emitting CONTROL_STATUS with this flag set."] const GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER = 1 ; # [doc = "Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover)."] const GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED = 2 ; } }
957impl GcsControlStatusFlags {
958    pub const DEFAULT: Self = Self::GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER;
959}
960impl Default for GcsControlStatusFlags {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
966impl GimbalDeviceCapFlags {
967    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
968}
969impl Default for GimbalDeviceCapFlags {
970    fn default() -> Self {
971        Self::DEFAULT
972    }
973}
974bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
975impl GimbalDeviceErrorFlags {
976    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
977}
978impl Default for GimbalDeviceErrorFlags {
979    fn default() -> Self {
980        Self::DEFAULT
981    }
982}
983bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
984impl GimbalDeviceFlags {
985    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
986}
987impl Default for GimbalDeviceFlags {
988    fn default() -> Self {
989        Self::DEFAULT
990    }
991}
992bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
993impl GimbalManagerCapFlags {
994    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
995}
996impl Default for GimbalManagerCapFlags {
997    fn default() -> Self {
998        Self::DEFAULT
999    }
1000}
1001bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1002impl GimbalManagerFlags {
1003    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1004}
1005impl Default for GimbalManagerFlags {
1006    fn default() -> Self {
1007        Self::DEFAULT
1008    }
1009}
1010#[cfg_attr(feature = "ts", derive(TS))]
1011#[cfg_attr(feature = "ts", ts(export))]
1012#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1014#[cfg_attr(feature = "serde", serde(tag = "type"))]
1015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1016#[repr(u32)]
1017#[doc = "Signal authentication state in a GPS receiver."]
1018pub enum GpsAuthenticationState {
1019    #[doc = "The GPS receiver does not provide GPS signal authentication info."]
1020    GPS_AUTHENTICATION_STATE_UNKNOWN = 0,
1021    #[doc = "The GPS receiver is initializing signal authentication."]
1022    GPS_AUTHENTICATION_STATE_INITIALIZING = 1,
1023    #[doc = "The GPS receiver encountered an error while initializing signal authentication."]
1024    GPS_AUTHENTICATION_STATE_ERROR = 2,
1025    #[doc = "The GPS receiver has correctly authenticated all signals."]
1026    GPS_AUTHENTICATION_STATE_OK = 3,
1027    #[doc = "GPS signal authentication is disabled on the receiver."]
1028    GPS_AUTHENTICATION_STATE_DISABLED = 4,
1029}
1030impl GpsAuthenticationState {
1031    pub const DEFAULT: Self = Self::GPS_AUTHENTICATION_STATE_UNKNOWN;
1032}
1033impl Default for GpsAuthenticationState {
1034    fn default() -> Self {
1035        Self::DEFAULT
1036    }
1037}
1038#[cfg_attr(feature = "ts", derive(TS))]
1039#[cfg_attr(feature = "ts", ts(export))]
1040#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1042#[cfg_attr(feature = "serde", serde(tag = "type"))]
1043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1044#[repr(u32)]
1045#[doc = "Type of GPS fix"]
1046pub enum GpsFixType {
1047    #[doc = "No GPS connected"]
1048    GPS_FIX_TYPE_NO_GPS = 0,
1049    #[doc = "No position information, GPS is connected"]
1050    GPS_FIX_TYPE_NO_FIX = 1,
1051    #[doc = "2D position"]
1052    GPS_FIX_TYPE_2D_FIX = 2,
1053    #[doc = "3D position"]
1054    GPS_FIX_TYPE_3D_FIX = 3,
1055    #[doc = "DGPS/SBAS aided 3D position"]
1056    GPS_FIX_TYPE_DGPS = 4,
1057    #[doc = "RTK float, 3D position"]
1058    GPS_FIX_TYPE_RTK_FLOAT = 5,
1059    #[doc = "RTK Fixed, 3D position"]
1060    GPS_FIX_TYPE_RTK_FIXED = 6,
1061    #[doc = "Static fixed, typically used for base stations"]
1062    GPS_FIX_TYPE_STATIC = 7,
1063    #[doc = "PPP, 3D position."]
1064    GPS_FIX_TYPE_PPP = 8,
1065}
1066impl GpsFixType {
1067    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1068}
1069impl Default for GpsFixType {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1075impl GpsInputIgnoreFlags {
1076    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1077}
1078impl Default for GpsInputIgnoreFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083#[cfg_attr(feature = "ts", derive(TS))]
1084#[cfg_attr(feature = "ts", ts(export))]
1085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1087#[cfg_attr(feature = "serde", serde(tag = "type"))]
1088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1089#[repr(u32)]
1090#[doc = "Signal jamming state in a GPS receiver."]
1091pub enum GpsJammingState {
1092    #[doc = "The GPS receiver does not provide GPS signal jamming info."]
1093    GPS_JAMMING_STATE_UNKNOWN = 0,
1094    #[doc = "The GPS receiver detected no signal jamming."]
1095    GPS_JAMMING_STATE_OK = 1,
1096    #[doc = "The GPS receiver detected and mitigated signal jamming."]
1097    GPS_JAMMING_STATE_MITIGATED = 2,
1098    #[doc = "The GPS receiver detected signal jamming."]
1099    GPS_JAMMING_STATE_DETECTED = 3,
1100}
1101impl GpsJammingState {
1102    pub const DEFAULT: Self = Self::GPS_JAMMING_STATE_UNKNOWN;
1103}
1104impl Default for GpsJammingState {
1105    fn default() -> Self {
1106        Self::DEFAULT
1107    }
1108}
1109#[cfg_attr(feature = "ts", derive(TS))]
1110#[cfg_attr(feature = "ts", ts(export))]
1111#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1113#[cfg_attr(feature = "serde", serde(tag = "type"))]
1114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1115#[repr(u32)]
1116#[doc = "State of RAIM processing."]
1117pub enum GpsRaimState {
1118    #[doc = "RAIM capability is unknown."]
1119    GPS_RAIM_STATE_UNKNOWN = 0,
1120    #[doc = "RAIM is disabled."]
1121    GPS_RAIM_STATE_DISABLED = 1,
1122    #[doc = "RAIM integrity check was successful."]
1123    GPS_RAIM_STATE_OK = 2,
1124    #[doc = "RAIM integrity check failed."]
1125    GPS_RAIM_STATE_FAILED = 3,
1126}
1127impl GpsRaimState {
1128    pub const DEFAULT: Self = Self::GPS_RAIM_STATE_UNKNOWN;
1129}
1130impl Default for GpsRaimState {
1131    fn default() -> Self {
1132        Self::DEFAULT
1133    }
1134}
1135#[cfg_attr(feature = "ts", derive(TS))]
1136#[cfg_attr(feature = "ts", ts(export))]
1137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1139#[cfg_attr(feature = "serde", serde(tag = "type"))]
1140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1141#[repr(u32)]
1142#[doc = "Signal spoofing state in a GPS receiver."]
1143pub enum GpsSpoofingState {
1144    #[doc = "The GPS receiver does not provide GPS signal spoofing info."]
1145    GPS_SPOOFING_STATE_UNKNOWN = 0,
1146    #[doc = "The GPS receiver detected no signal spoofing."]
1147    GPS_SPOOFING_STATE_OK = 1,
1148    #[doc = "The GPS receiver detected and mitigated signal spoofing."]
1149    GPS_SPOOFING_STATE_MITIGATED = 2,
1150    #[doc = "The GPS receiver detected signal spoofing but still has a fix."]
1151    GPS_SPOOFING_STATE_DETECTED = 3,
1152}
1153impl GpsSpoofingState {
1154    pub const DEFAULT: Self = Self::GPS_SPOOFING_STATE_UNKNOWN;
1155}
1156impl Default for GpsSpoofingState {
1157    fn default() -> Self {
1158        Self::DEFAULT
1159    }
1160}
1161bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags indicating errors in a GPS receiver."] pub struct GpsSystemErrorFlags : u32 { # [doc = "There are problems with incoming correction streams."] const GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS = 1 ; # [doc = "There are problems with the configuration."] const GPS_SYSTEM_ERROR_CONFIGURATION = 2 ; # [doc = "There are problems with the software on the GPS receiver."] const GPS_SYSTEM_ERROR_SOFTWARE = 4 ; # [doc = "There are problems with an antenna connected to the GPS receiver."] const GPS_SYSTEM_ERROR_ANTENNA = 8 ; # [doc = "There are problems handling all incoming events."] const GPS_SYSTEM_ERROR_EVENT_CONGESTION = 16 ; # [doc = "The GPS receiver CPU is overloaded."] const GPS_SYSTEM_ERROR_CPU_OVERLOAD = 32 ; # [doc = "The GPS receiver is experiencing output congestion."] const GPS_SYSTEM_ERROR_OUTPUT_CONGESTION = 64 ; } }
1162impl GpsSystemErrorFlags {
1163    pub const DEFAULT: Self = Self::GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS;
1164}
1165impl Default for GpsSystemErrorFlags {
1166    fn default() -> Self {
1167        Self::DEFAULT
1168    }
1169}
1170#[cfg_attr(feature = "ts", derive(TS))]
1171#[cfg_attr(feature = "ts", ts(export))]
1172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1174#[cfg_attr(feature = "serde", serde(tag = "type"))]
1175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1176#[repr(u32)]
1177#[doc = "Gripper actions."]
1178pub enum GripperActions {
1179    #[doc = "Gripper release cargo."]
1180    GRIPPER_ACTION_RELEASE = 0,
1181    #[doc = "Gripper grab onto cargo."]
1182    GRIPPER_ACTION_GRAB = 1,
1183}
1184impl GripperActions {
1185    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1186}
1187impl Default for GripperActions {
1188    fn default() -> Self {
1189        Self::DEFAULT
1190    }
1191}
1192bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1193impl HighresImuUpdatedFlags {
1194    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1195}
1196impl Default for HighresImuUpdatedFlags {
1197    fn default() -> Self {
1198        Self::DEFAULT
1199    }
1200}
1201bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1202impl HilActuatorControlsFlags {
1203    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1204}
1205impl Default for HilActuatorControlsFlags {
1206    fn default() -> Self {
1207        Self::DEFAULT
1208    }
1209}
1210bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1211impl HilSensorUpdatedFlags {
1212    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1213}
1214impl Default for HilSensorUpdatedFlags {
1215    fn default() -> Self {
1216        Self::DEFAULT
1217    }
1218}
1219bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1220impl HlFailureFlag {
1221    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1222}
1223impl Default for HlFailureFlag {
1224    fn default() -> Self {
1225        Self::DEFAULT
1226    }
1227}
1228bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1229impl IlluminatorErrorFlags {
1230    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1231}
1232impl Default for IlluminatorErrorFlags {
1233    fn default() -> Self {
1234        Self::DEFAULT
1235    }
1236}
1237#[cfg_attr(feature = "ts", derive(TS))]
1238#[cfg_attr(feature = "ts", ts(export))]
1239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1241#[cfg_attr(feature = "serde", serde(tag = "type"))]
1242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1243#[repr(u32)]
1244#[doc = "Modes of illuminator"]
1245pub enum IlluminatorMode {
1246    #[doc = "Illuminator mode is not specified/unknown"]
1247    ILLUMINATOR_MODE_UNKNOWN = 0,
1248    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1249    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1250    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1251    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1252}
1253impl IlluminatorMode {
1254    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1255}
1256impl Default for IlluminatorMode {
1257    fn default() -> Self {
1258        Self::DEFAULT
1259    }
1260}
1261#[cfg_attr(feature = "ts", derive(TS))]
1262#[cfg_attr(feature = "ts", ts(export))]
1263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1265#[cfg_attr(feature = "serde", serde(tag = "type"))]
1266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1267#[repr(u32)]
1268#[doc = "Type of landing target"]
1269pub enum LandingTargetType {
1270    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1271    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1272    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1273    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1274    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1275    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1276    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1277    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1278}
1279impl LandingTargetType {
1280    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1281}
1282impl Default for LandingTargetType {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287#[cfg_attr(feature = "ts", derive(TS))]
1288#[cfg_attr(feature = "ts", ts(export))]
1289#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1291#[cfg_attr(feature = "serde", serde(tag = "type"))]
1292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1293#[repr(u32)]
1294pub enum MagCalStatus {
1295    MAG_CAL_NOT_STARTED = 0,
1296    MAG_CAL_WAITING_TO_START = 1,
1297    MAG_CAL_RUNNING_STEP_ONE = 2,
1298    MAG_CAL_RUNNING_STEP_TWO = 3,
1299    MAG_CAL_SUCCESS = 4,
1300    MAG_CAL_FAILED = 5,
1301    MAG_CAL_BAD_ORIENTATION = 6,
1302    MAG_CAL_BAD_RADIUS = 7,
1303}
1304impl MagCalStatus {
1305    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1306}
1307impl Default for MagCalStatus {
1308    fn default() -> Self {
1309        Self::DEFAULT
1310    }
1311}
1312#[cfg_attr(feature = "ts", derive(TS))]
1313#[cfg_attr(feature = "ts", ts(export))]
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319pub enum MavArmAuthDeniedReason {
1320    #[doc = "Not a specific reason"]
1321    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1322    #[doc = "Authorizer will send the error as string to GCS"]
1323    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1324    #[doc = "At least one waypoint have a invalid value"]
1325    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1326    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1327    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1328    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1329    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1330    #[doc = "Weather is not good to fly"]
1331    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1332}
1333impl MavArmAuthDeniedReason {
1334    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1335}
1336impl Default for MavArmAuthDeniedReason {
1337    fn default() -> Self {
1338        Self::DEFAULT
1339    }
1340}
1341#[cfg_attr(feature = "ts", derive(TS))]
1342#[cfg_attr(feature = "ts", ts(export))]
1343#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1345#[cfg_attr(feature = "serde", serde(tag = "type"))]
1346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1347#[repr(u32)]
1348#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1349pub enum MavAutopilot {
1350    #[doc = "Generic autopilot, full support for everything"]
1351    MAV_AUTOPILOT_GENERIC = 0,
1352    #[doc = "Reserved for future use."]
1353    MAV_AUTOPILOT_RESERVED = 1,
1354    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1355    MAV_AUTOPILOT_SLUGS = 2,
1356    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1357    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1358    #[doc = "OpenPilot, <http://openpilot.org>"]
1359    MAV_AUTOPILOT_OPENPILOT = 4,
1360    #[doc = "Generic autopilot only supporting simple waypoints"]
1361    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1362    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1363    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1364    #[doc = "Generic autopilot supporting the full mission command set"]
1365    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1366    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1367    MAV_AUTOPILOT_INVALID = 8,
1368    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1369    MAV_AUTOPILOT_PPZ = 9,
1370    #[doc = "UAV Dev Board"]
1371    MAV_AUTOPILOT_UDB = 10,
1372    #[doc = "FlexiPilot"]
1373    MAV_AUTOPILOT_FP = 11,
1374    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1375    MAV_AUTOPILOT_PX4 = 12,
1376    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1377    MAV_AUTOPILOT_SMACCMPILOT = 13,
1378    #[doc = "AutoQuad -- <http://autoquad.org>"]
1379    MAV_AUTOPILOT_AUTOQUAD = 14,
1380    #[doc = "Armazila -- <http://armazila.com>"]
1381    MAV_AUTOPILOT_ARMAZILA = 15,
1382    #[doc = "Aerob -- <http://aerob.ru>"]
1383    MAV_AUTOPILOT_AEROB = 16,
1384    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1385    MAV_AUTOPILOT_ASLUAV = 17,
1386    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1387    MAV_AUTOPILOT_SMARTAP = 18,
1388    #[doc = "AirRails - <http://uaventure.com>"]
1389    MAV_AUTOPILOT_AIRRAILS = 19,
1390    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1391    MAV_AUTOPILOT_REFLEX = 20,
1392}
1393impl MavAutopilot {
1394    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1395}
1396impl Default for MavAutopilot {
1397    fn default() -> Self {
1398        Self::DEFAULT
1399    }
1400}
1401#[cfg_attr(feature = "ts", derive(TS))]
1402#[cfg_attr(feature = "ts", ts(export))]
1403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1405#[cfg_attr(feature = "serde", serde(tag = "type"))]
1406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1407#[repr(u32)]
1408#[doc = "Enumeration for battery charge states."]
1409pub enum MavBatteryChargeState {
1410    #[doc = "Low battery state is not provided"]
1411    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1412    #[doc = "Battery is not in low state. Normal operation."]
1413    MAV_BATTERY_CHARGE_STATE_OK = 1,
1414    #[doc = "Battery state is low, warn and monitor close."]
1415    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1416    #[doc = "Battery state is critical, return or abort immediately."]
1417    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1418    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1419    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1420    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1421    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1422    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1423    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1424    #[doc = "Battery is charging."]
1425    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1426}
1427impl MavBatteryChargeState {
1428    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1429}
1430impl Default for MavBatteryChargeState {
1431    fn default() -> Self {
1432        Self::DEFAULT
1433    }
1434}
1435bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1436impl MavBatteryFault {
1437    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1438}
1439impl Default for MavBatteryFault {
1440    fn default() -> Self {
1441        Self::DEFAULT
1442    }
1443}
1444#[cfg_attr(feature = "ts", derive(TS))]
1445#[cfg_attr(feature = "ts", ts(export))]
1446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1448#[cfg_attr(feature = "serde", serde(tag = "type"))]
1449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1450#[repr(u32)]
1451#[doc = "Enumeration of battery functions"]
1452pub enum MavBatteryFunction {
1453    #[doc = "Battery function is unknown"]
1454    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1455    #[doc = "Battery supports all flight systems"]
1456    MAV_BATTERY_FUNCTION_ALL = 1,
1457    #[doc = "Battery for the propulsion system"]
1458    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1459    #[doc = "Avionics battery"]
1460    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1461    #[doc = "Payload battery"]
1462    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1463}
1464impl MavBatteryFunction {
1465    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1466}
1467impl Default for MavBatteryFunction {
1468    fn default() -> Self {
1469        Self::DEFAULT
1470    }
1471}
1472#[cfg_attr(feature = "ts", derive(TS))]
1473#[cfg_attr(feature = "ts", ts(export))]
1474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1476#[cfg_attr(feature = "serde", serde(tag = "type"))]
1477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1478#[repr(u32)]
1479#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1480pub enum MavBatteryMode {
1481    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1482    MAV_BATTERY_MODE_UNKNOWN = 0,
1483    #[doc = "Battery is auto discharging (towards storage level)."]
1484    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1485    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1486    MAV_BATTERY_MODE_HOT_SWAP = 2,
1487}
1488impl MavBatteryMode {
1489    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1490}
1491impl Default for MavBatteryMode {
1492    fn default() -> Self {
1493        Self::DEFAULT
1494    }
1495}
1496bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Battery status flags for fault, health and state indication."] pub struct MavBatteryStatusFlags : u32 { # [doc = "The battery is not ready to use (fly).           Set if the battery has faults or other conditions that make it unsafe to fly with.           Note: It will be the logical OR of other status bits (chosen by the manufacturer/integrator)."] const MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE = 1 ; # [doc = "Battery is charging."] const MAV_BATTERY_STATUS_FLAGS_CHARGING = 2 ; # [doc = "Battery is cell balancing (during charging).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE may be set)."] const MAV_BATTERY_STATUS_FLAGS_CELL_BALANCING = 4 ; # [doc = "Battery cells are not balanced.           Not ready to use."] const MAV_BATTERY_STATUS_FLAGS_FAULT_CELL_IMBALANCE = 8 ; # [doc = "Battery is auto discharging (towards storage level).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE would be set)."] const MAV_BATTERY_STATUS_FLAGS_AUTO_DISCHARGING = 16 ; # [doc = "Battery requires service (not safe to fly).           This is set at vendor discretion.           It is likely to be set for most faults, and may also be set according to a maintenance schedule (such as age, or number of recharge cycles, etc.)."] const MAV_BATTERY_STATUS_FLAGS_REQUIRES_SERVICE = 32 ; # [doc = "Battery is faulty and cannot be repaired (not safe to fly).           This is set at vendor discretion.           The battery should be disposed of safely."] const MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY = 64 ; # [doc = "Automatic battery protection monitoring is enabled.           When enabled, the system will monitor for certain kinds of faults, such as cells being over-voltage.           If a fault is triggered then and protections are enabled then a safety fault (MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM) will be set and power from the battery will be stopped.           Note that battery protection monitoring should only be enabled when the vehicle is landed. Once the vehicle is armed, or starts moving, the protections should be disabled to prevent false positives from disabling the output."] const MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED = 128 ; # [doc = "The battery fault protection system had detected a fault and cut all power from the battery.           This will only trigger if MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED is set.           Other faults like MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT may also be set, indicating the cause of the protection fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM = 256 ; # [doc = "One or more cells are above their maximum voltage rating."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT = 512 ; # [doc = "One or more cells are below their minimum voltage rating.           A battery that had deep-discharged might be irrepairably damaged, and set both MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT and MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT = 1024 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_TEMPERATURE = 2048 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_TEMPERATURE = 4096 ; # [doc = "Over-current fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_CURRENT = 8192 ; # [doc = "Short circuit event detected.           The battery may or may not be safe to use (check other flags)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_SHORT_CIRCUIT = 16384 ; # [doc = "Voltage not compatible with power rail voltage (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_VOLTAGE = 32768 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_FIRMWARE = 65536 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 131072 ; # [doc = "Battery capacity_consumed and capacity_remaining values are relative to a full battery (they sum to the total capacity of the battery).           This flag would be set for a smart battery that can accurately determine its remaining charge across vehicle reboots and discharge/recharge cycles.           If unset the capacity_consumed indicates the consumption since vehicle power-on, as measured using a power monitor. The capacity_remaining, if provided, indicates the estimated remaining capacity on the assumption that the battery was full on vehicle boot.           If unset a GCS is recommended to advise that users fully charge the battery on power on."] const MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL = 262144 ; # [doc = "Reserved (not used). If set, this will indicate that an additional status field exists for higher status values."] const MAV_BATTERY_STATUS_FLAGS_EXTENDED = 2147483648 ; } }
1497impl MavBatteryStatusFlags {
1498    pub const DEFAULT: Self = Self::MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE;
1499}
1500impl Default for MavBatteryStatusFlags {
1501    fn default() -> Self {
1502        Self::DEFAULT
1503    }
1504}
1505#[cfg_attr(feature = "ts", derive(TS))]
1506#[cfg_attr(feature = "ts", ts(export))]
1507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1509#[cfg_attr(feature = "serde", serde(tag = "type"))]
1510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1511#[repr(u32)]
1512#[doc = "Enumeration of battery types"]
1513pub enum MavBatteryType {
1514    #[doc = "Not specified."]
1515    MAV_BATTERY_TYPE_UNKNOWN = 0,
1516    #[doc = "Lithium polymer battery"]
1517    MAV_BATTERY_TYPE_LIPO = 1,
1518    #[doc = "Lithium-iron-phosphate battery"]
1519    MAV_BATTERY_TYPE_LIFE = 2,
1520    #[doc = "Lithium-ION battery"]
1521    MAV_BATTERY_TYPE_LION = 3,
1522    #[doc = "Nickel metal hydride battery"]
1523    MAV_BATTERY_TYPE_NIMH = 4,
1524}
1525impl MavBatteryType {
1526    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1527}
1528impl Default for MavBatteryType {
1529    fn default() -> Self {
1530        Self::DEFAULT
1531    }
1532}
1533#[cfg_attr(feature = "ts", derive(TS))]
1534#[cfg_attr(feature = "ts", ts(export))]
1535#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1537#[cfg_attr(feature = "serde", serde(tag = "type"))]
1538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1539#[repr(u32)]
1540#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1541pub enum MavCmd {
1542    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1543    MAV_CMD_NAV_WAYPOINT = 16,
1544    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1545    MAV_CMD_NAV_LOITER_UNLIM = 17,
1546    #[doc = "Loiter around this waypoint for X turns"]
1547    MAV_CMD_NAV_LOITER_TURNS = 18,
1548    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1549    MAV_CMD_NAV_LOITER_TIME = 19,
1550    #[doc = "Return to launch location"]
1551    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1552    #[doc = "Land at location."]
1553    MAV_CMD_NAV_LAND = 21,
1554    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1555    MAV_CMD_NAV_TAKEOFF = 22,
1556    #[doc = "Land at local position (local frame only)"]
1557    MAV_CMD_NAV_LAND_LOCAL = 23,
1558    #[doc = "Takeoff from local position (local frame only)"]
1559    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1560    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1561    MAV_CMD_NAV_FOLLOW = 25,
1562    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1563    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1564    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1565    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1566    #[doc = "Begin following a target"]
1567    MAV_CMD_DO_FOLLOW = 32,
1568    #[doc = "Reposition the MAV after a follow target command has been sent"]
1569    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1570    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1571    MAV_CMD_DO_ORBIT = 34,
1572    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1573    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1574    MAV_CMD_NAV_ROI = 80,
1575    #[doc = "Control autonomous path planning on the MAV."]
1576    MAV_CMD_NAV_PATHPLANNING = 81,
1577    #[doc = "Navigate to waypoint using a spline path."]
1578    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1579    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1580    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1581    #[doc = "Land using VTOL mode"]
1582    MAV_CMD_NAV_VTOL_LAND = 85,
1583    #[doc = "hand control over to an external controller"]
1584    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1585    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1586    MAV_CMD_NAV_DELAY = 93,
1587    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1588    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1589    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1590    MAV_CMD_NAV_LAST = 95,
1591    #[doc = "Delay mission state machine."]
1592    MAV_CMD_CONDITION_DELAY = 112,
1593    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1594    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1595    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1596    MAV_CMD_CONDITION_DISTANCE = 114,
1597    #[doc = "Reach a certain target angle."]
1598    MAV_CMD_CONDITION_YAW = 115,
1599    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1600    MAV_CMD_CONDITION_LAST = 159,
1601    #[doc = "Set system mode."]
1602    MAV_CMD_DO_SET_MODE = 176,
1603    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1604    MAV_CMD_DO_JUMP = 177,
1605    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1606    MAV_CMD_DO_CHANGE_SPEED = 178,
1607    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1608    MAV_CMD_DO_SET_HOME = 179,
1609    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1610    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1611    MAV_CMD_DO_SET_PARAMETER = 180,
1612    #[doc = "Set a relay to a condition."]
1613    MAV_CMD_DO_SET_RELAY = 181,
1614    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1615    MAV_CMD_DO_REPEAT_RELAY = 182,
1616    #[doc = "Set a servo to a desired PWM value."]
1617    MAV_CMD_DO_SET_SERVO = 183,
1618    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1619    MAV_CMD_DO_REPEAT_SERVO = 184,
1620    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1621    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1622    #[doc = "Change altitude set point."]
1623    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1624    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1625    MAV_CMD_DO_SET_ACTUATOR = 187,
1626    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1627    MAV_CMD_DO_RETURN_PATH_START = 188,
1628    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1629    MAV_CMD_DO_LAND_START = 189,
1630    #[doc = "Mission command to perform a landing from a rally point."]
1631    MAV_CMD_DO_RALLY_LAND = 190,
1632    #[doc = "Mission command to safely abort an autonomous landing."]
1633    MAV_CMD_DO_GO_AROUND = 191,
1634    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1635    MAV_CMD_DO_REPOSITION = 192,
1636    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1637    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1638    #[doc = "Set moving direction to forward or reverse."]
1639    MAV_CMD_DO_SET_REVERSE = 194,
1640    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1641    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1642    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1643    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1644    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1645    MAV_CMD_DO_SET_ROI_NONE = 197,
1646    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1647    MAV_CMD_DO_SET_ROI_SYSID = 198,
1648    #[doc = "Control onboard camera system."]
1649    MAV_CMD_DO_CONTROL_VIDEO = 200,
1650    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1651    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1652    MAV_CMD_DO_SET_ROI = 201,
1653    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1654    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1655    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1656    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1657    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1658    #[doc = "Mission command to configure a camera or antenna mount"]
1659    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1660    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1661    #[doc = "Mission command to control a camera or antenna mount"]
1662    MAV_CMD_DO_MOUNT_CONTROL = 205,
1663    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1664    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1665    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1666    MAV_CMD_DO_FENCE_ENABLE = 207,
1667    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1668    MAV_CMD_DO_PARACHUTE = 208,
1669    #[doc = "Command to perform motor test."]
1670    MAV_CMD_DO_MOTOR_TEST = 209,
1671    #[doc = "Change to/from inverted flight."]
1672    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1673    #[doc = "Mission command to operate a gripper."]
1674    MAV_CMD_DO_GRIPPER = 211,
1675    #[doc = "Enable/disable autotune."]
1676    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1677    #[doc = "Sets a desired vehicle turn angle and speed change."]
1678    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1679    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1680    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1681    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1682    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1683    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1684    #[doc = "set id of master controller"]
1685    MAV_CMD_DO_GUIDED_MASTER = 221,
1686    #[doc = "Set limits for external control"]
1687    MAV_CMD_DO_GUIDED_LIMITS = 222,
1688    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1689    MAV_CMD_DO_ENGINE_CONTROL = 223,
1690    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1691    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1692    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1693    MAV_CMD_DO_LAST = 240,
1694    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1695    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1696    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1697    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1698    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1699    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1700    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1701    MAV_CMD_PREFLIGHT_STORAGE = 245,
1702    #[doc = "Request the reboot or shutdown of system components."]
1703    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1704    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1705    MAV_CMD_OVERRIDE_GOTO = 252,
1706    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1707    MAV_CMD_OBLIQUE_SURVEY = 260,
1708    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1709    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1710    #[doc = "start running a mission"]
1711    MAV_CMD_MISSION_START = 300,
1712    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1713    MAV_CMD_ACTUATOR_TEST = 310,
1714    #[doc = "Actuator configuration command."]
1715    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1716    #[doc = "Arms / Disarms a component"]
1717    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1718    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1719    MAV_CMD_RUN_PREARM_CHECKS = 401,
1720    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1721    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1722    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1723    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1724    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1725    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1726    MAV_CMD_GET_HOME_POSITION = 410,
1727    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1728    MAV_CMD_INJECT_FAILURE = 420,
1729    #[doc = "Starts receiver pairing."]
1730    MAV_CMD_START_RX_PAIR = 500,
1731    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1732    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1733    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1734    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1735    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1736    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1737    MAV_CMD_REQUEST_MESSAGE = 512,
1738    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1739    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1740    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1741    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1742    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1743    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1744    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1745    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1746    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1747    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1748    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1749    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1750    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1751    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1752    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1753    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1754    MAV_CMD_STORAGE_FORMAT = 526,
1755    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1756    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1757    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1758    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1759    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1760    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1761    #[doc = "Reset all camera settings to Factory Default"]
1762    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1763    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1764    MAV_CMD_SET_CAMERA_MODE = 530,
1765    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1766    MAV_CMD_SET_CAMERA_ZOOM = 531,
1767    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1768    MAV_CMD_SET_CAMERA_FOCUS = 532,
1769    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1770    MAV_CMD_SET_STORAGE_USAGE = 533,
1771    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1772    MAV_CMD_SET_CAMERA_SOURCE = 534,
1773    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1774    MAV_CMD_JUMP_TAG = 600,
1775    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1776    MAV_CMD_DO_JUMP_TAG = 601,
1777    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1778    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1779    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1780    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1781    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1782    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1783    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1784    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1785    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1786    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1787    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1788    #[doc = "Enable or disable on-board camera triggering system."]
1789    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1790    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1791    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1792    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1793    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1794    #[doc = "Stops ongoing tracking."]
1795    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1796    #[doc = "Starts video capture (recording)."]
1797    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1798    #[doc = "Stop the current video capture (recording)."]
1799    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1800    #[doc = "Start video streaming"]
1801    MAV_CMD_VIDEO_START_STREAMING = 2502,
1802    #[doc = "Stop the given video stream"]
1803    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1804    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1805    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1806    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1807    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1808    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1809    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1810    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1811    MAV_CMD_LOGGING_START = 2510,
1812    #[doc = "Request to stop streaming log data over MAVLink"]
1813    MAV_CMD_LOGGING_STOP = 2511,
1814    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1815    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1816    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1817    #[doc = "Create a panorama at the current position"]
1818    MAV_CMD_PANORAMA_CREATE = 2800,
1819    #[doc = "Request VTOL transition"]
1820    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1821    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1822    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1823    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1824    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1825    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1826    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1827    #[doc = "Delay mission state machine until gate has been reached."]
1828    MAV_CMD_CONDITION_GATE = 4501,
1829    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1830    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1831    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1832    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1833    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1834    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1835    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1836    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1837    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1838    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1839    #[doc = "Rally point. You can have multiple rally points defined."]
1840    MAV_CMD_NAV_RALLY_POINT = 5100,
1841    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1842    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1843    #[doc = "Change state of safety switch."]
1844    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1845    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1846    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1847    #[deprecated = "  (Deprecated since 2021-06)"]
1848    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1849    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1850    #[deprecated = "  (Deprecated since 2021-06)"]
1851    #[doc = "Control the payload deployment."]
1852    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1853    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1854    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1855    #[doc = "Command to operate winch."]
1856    MAV_CMD_DO_WINCH = 42600,
1857    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1858    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1859    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1860    MAV_CMD_WAYPOINT_USER_1 = 31000,
1861    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1862    MAV_CMD_WAYPOINT_USER_2 = 31001,
1863    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1864    MAV_CMD_WAYPOINT_USER_3 = 31002,
1865    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1866    MAV_CMD_WAYPOINT_USER_4 = 31003,
1867    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1868    MAV_CMD_WAYPOINT_USER_5 = 31004,
1869    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1870    MAV_CMD_SPATIAL_USER_1 = 31005,
1871    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1872    MAV_CMD_SPATIAL_USER_2 = 31006,
1873    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1874    MAV_CMD_SPATIAL_USER_3 = 31007,
1875    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1876    MAV_CMD_SPATIAL_USER_4 = 31008,
1877    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1878    MAV_CMD_SPATIAL_USER_5 = 31009,
1879    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1880    MAV_CMD_USER_1 = 31010,
1881    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1882    MAV_CMD_USER_2 = 31011,
1883    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1884    MAV_CMD_USER_3 = 31012,
1885    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1886    MAV_CMD_USER_4 = 31013,
1887    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1888    MAV_CMD_USER_5 = 31014,
1889    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1890    MAV_CMD_CAN_FORWARD = 32000,
1891    #[doc = "Fly a figure eight path as defined by the parameters.           Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values.           The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation.           This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED).           Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading)."]
1892    MAV_CMD_DO_FIGURE_EIGHT = 35,
1893    #[doc = "Request a target system to start an upgrade of one (or all) of its components.           For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller.           The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation.           Command protocol information: <https://mavlink.io/en/services/command.html>."]
1894    MAV_CMD_DO_UPGRADE = 247,
1895    #[doc = "Allows setting an AT S command of an SiK radio."]
1896    MAV_CMD_SET_AT_S_PARAM = 550,
1897    #[doc = "Set system and component id.           This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id.           Recipients must reject command addressed to broadcast system ID."]
1898    MAV_CMD_DO_SET_SYS_CMP_ID = 610,
1899    #[doc = "Sets the GNSS coordinates of the vehicle local origin (0,0,0) position.           Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed.           This enables transform between the local coordinate frame and the global (GNSS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor.           This command supersedes SET_GPS_GLOBAL_ORIGIN.           Should be sent in a COMMAND_INT (Expected frame is MAV_FRAME_GLOBAL, and this should be assumed when sent in COMMAND_LONG)."]
1900    MAV_CMD_DO_SET_GLOBAL_ORIGIN = 611,
1901    #[doc = "Used to manually set/unset emergency status for remote id.           This is for compliance with MOC ASTM docs, specifically F358 section 7.7: \"Emergency Status Indicator\".           The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred.           See <https://mavlink.io/en/services/opendroneid.html> for more information."]
1902    MAV_CMD_ODID_SET_EMERGENCY = 12900,
1903    #[doc = "Set an external estimate of wind direction and speed.           This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself."]
1904    MAV_CMD_EXTERNAL_WIND_ESTIMATE = 43004,
1905    #[doc = "Request GCS control of a system (or of a specific component in a system).            A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.           Commands from other systems should be rejected with MAV_RESULT_FAILED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted).           Command-like messages should be ignored (or rejected if that is supported by their associated protocol).            GCS control of the whole system is managed via a single component that we will refer to here as the \"system manager component\".           This component streams the CONTROL_STATUS message and sets the GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER flag.           Other components in the system should monitor for the CONTROL_STATUS message with this flag, and set their controlling GCS to match its published system id.           A GCS that wants to control the system should also monitor for the same message and flag, and address the MAV_CMD_REQUEST_OPERATOR_CONTROL to its component id.           Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER set).            The MAV_CMD_REQUEST_OPERATOR_CONTROL command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.            The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED.           The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.            If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_FAILED.           The system manager component should then send this same command to the current owning GCS in order to notify of the request.           The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.           In case it choses to re-request control with takeover bit set to allow permission, requestor GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requestor GCS will need repeat the request if still interested in getting control.           Note that the pilots of both GCS should co-ordinate safe handover offline.            Note that in most systems the only controlled component will be the \"system manager component\", and that will be the autopilot.           However separate GCS control of a particular component is also permitted, if supported by the component.           In this case the GCS will address MAV_CMD_REQUEST_OPERATOR_CONTROL to the specific component it wants to control.           The component will then stream CONTROL_STATUS for its controlling GCS (it must not set GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER).           The component should fall back to the system GCS (if any) when it is not directly controlled, and may stop emitting CONTROL_STATUS.           The flow is otherwise the same as for requesting control over the whole system."]
1906    MAV_CMD_REQUEST_OPERATOR_CONTROL = 32100,
1907}
1908impl MavCmd {
1909    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1910}
1911impl Default for MavCmd {
1912    fn default() -> Self {
1913        Self::DEFAULT
1914    }
1915}
1916#[cfg_attr(feature = "ts", derive(TS))]
1917#[cfg_attr(feature = "ts", ts(export))]
1918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1920#[cfg_attr(feature = "serde", serde(tag = "type"))]
1921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1922#[repr(u32)]
1923#[doc = "Possible actions an aircraft can take to avoid a collision."]
1924pub enum MavCollisionAction {
1925    #[doc = "Ignore any potential collisions"]
1926    MAV_COLLISION_ACTION_NONE = 0,
1927    #[doc = "Report potential collision"]
1928    MAV_COLLISION_ACTION_REPORT = 1,
1929    #[doc = "Ascend or Descend to avoid threat"]
1930    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1931    #[doc = "Move horizontally to avoid threat"]
1932    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1933    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1934    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1935    #[doc = "Aircraft to fly directly back to its launch point"]
1936    MAV_COLLISION_ACTION_RTL = 5,
1937    #[doc = "Aircraft to stop in place"]
1938    MAV_COLLISION_ACTION_HOVER = 6,
1939}
1940impl MavCollisionAction {
1941    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1942}
1943impl Default for MavCollisionAction {
1944    fn default() -> Self {
1945        Self::DEFAULT
1946    }
1947}
1948#[cfg_attr(feature = "ts", derive(TS))]
1949#[cfg_attr(feature = "ts", ts(export))]
1950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1952#[cfg_attr(feature = "serde", serde(tag = "type"))]
1953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1954#[repr(u32)]
1955#[doc = "Source of information about this collision."]
1956pub enum MavCollisionSrc {
1957    #[doc = "ID field references ADSB_VEHICLE packets"]
1958    MAV_COLLISION_SRC_ADSB = 0,
1959    #[doc = "ID field references MAVLink SRC ID"]
1960    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1961}
1962impl MavCollisionSrc {
1963    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1964}
1965impl Default for MavCollisionSrc {
1966    fn default() -> Self {
1967        Self::DEFAULT
1968    }
1969}
1970#[cfg_attr(feature = "ts", derive(TS))]
1971#[cfg_attr(feature = "ts", ts(export))]
1972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1974#[cfg_attr(feature = "serde", serde(tag = "type"))]
1975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1976#[repr(u32)]
1977#[doc = "Aircraft-rated danger from this threat."]
1978pub enum MavCollisionThreatLevel {
1979    #[doc = "Not a threat"]
1980    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1981    #[doc = "Craft is mildly concerned about this threat"]
1982    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1983    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1984    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1985}
1986impl MavCollisionThreatLevel {
1987    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1988}
1989impl Default for MavCollisionThreatLevel {
1990    fn default() -> Self {
1991        Self::DEFAULT
1992    }
1993}
1994#[cfg_attr(feature = "ts", derive(TS))]
1995#[cfg_attr(feature = "ts", ts(export))]
1996#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1998#[cfg_attr(feature = "serde", serde(tag = "type"))]
1999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2000#[repr(u32)]
2001#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2002pub enum MavComponent {
2003    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2004    MAV_COMP_ID_ALL = 0,
2005    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2006    MAV_COMP_ID_AUTOPILOT1 = 1,
2007    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2008    MAV_COMP_ID_USER1 = 25,
2009    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2010    MAV_COMP_ID_USER2 = 26,
2011    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2012    MAV_COMP_ID_USER3 = 27,
2013    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2014    MAV_COMP_ID_USER4 = 28,
2015    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2016    MAV_COMP_ID_USER5 = 29,
2017    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2018    MAV_COMP_ID_USER6 = 30,
2019    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2020    MAV_COMP_ID_USER7 = 31,
2021    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2022    MAV_COMP_ID_USER8 = 32,
2023    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2024    MAV_COMP_ID_USER9 = 33,
2025    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2026    MAV_COMP_ID_USER10 = 34,
2027    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2028    MAV_COMP_ID_USER11 = 35,
2029    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2030    MAV_COMP_ID_USER12 = 36,
2031    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2032    MAV_COMP_ID_USER13 = 37,
2033    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2034    MAV_COMP_ID_USER14 = 38,
2035    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2036    MAV_COMP_ID_USER15 = 39,
2037    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2038    MAV_COMP_ID_USER16 = 40,
2039    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2040    MAV_COMP_ID_USER17 = 41,
2041    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2042    MAV_COMP_ID_USER18 = 42,
2043    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2044    MAV_COMP_ID_USER19 = 43,
2045    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2046    MAV_COMP_ID_USER20 = 44,
2047    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2048    MAV_COMP_ID_USER21 = 45,
2049    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2050    MAV_COMP_ID_USER22 = 46,
2051    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2052    MAV_COMP_ID_USER23 = 47,
2053    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2054    MAV_COMP_ID_USER24 = 48,
2055    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2056    MAV_COMP_ID_USER25 = 49,
2057    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2058    MAV_COMP_ID_USER26 = 50,
2059    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2060    MAV_COMP_ID_USER27 = 51,
2061    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2062    MAV_COMP_ID_USER28 = 52,
2063    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2064    MAV_COMP_ID_USER29 = 53,
2065    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2066    MAV_COMP_ID_USER30 = 54,
2067    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2068    MAV_COMP_ID_USER31 = 55,
2069    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2070    MAV_COMP_ID_USER32 = 56,
2071    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2072    MAV_COMP_ID_USER33 = 57,
2073    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2074    MAV_COMP_ID_USER34 = 58,
2075    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2076    MAV_COMP_ID_USER35 = 59,
2077    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2078    MAV_COMP_ID_USER36 = 60,
2079    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2080    MAV_COMP_ID_USER37 = 61,
2081    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2082    MAV_COMP_ID_USER38 = 62,
2083    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2084    MAV_COMP_ID_USER39 = 63,
2085    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2086    MAV_COMP_ID_USER40 = 64,
2087    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2088    MAV_COMP_ID_USER41 = 65,
2089    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2090    MAV_COMP_ID_USER42 = 66,
2091    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2092    MAV_COMP_ID_USER43 = 67,
2093    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2094    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2095    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2096    MAV_COMP_ID_USER45 = 69,
2097    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2098    MAV_COMP_ID_USER46 = 70,
2099    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2100    MAV_COMP_ID_USER47 = 71,
2101    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2102    MAV_COMP_ID_USER48 = 72,
2103    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2104    MAV_COMP_ID_USER49 = 73,
2105    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2106    MAV_COMP_ID_USER50 = 74,
2107    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2108    MAV_COMP_ID_USER51 = 75,
2109    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2110    MAV_COMP_ID_USER52 = 76,
2111    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2112    MAV_COMP_ID_USER53 = 77,
2113    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2114    MAV_COMP_ID_USER54 = 78,
2115    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2116    MAV_COMP_ID_USER55 = 79,
2117    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2118    MAV_COMP_ID_USER56 = 80,
2119    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2120    MAV_COMP_ID_USER57 = 81,
2121    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2122    MAV_COMP_ID_USER58 = 82,
2123    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2124    MAV_COMP_ID_USER59 = 83,
2125    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2126    MAV_COMP_ID_USER60 = 84,
2127    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2128    MAV_COMP_ID_USER61 = 85,
2129    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2130    MAV_COMP_ID_USER62 = 86,
2131    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2132    MAV_COMP_ID_USER63 = 87,
2133    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2134    MAV_COMP_ID_USER64 = 88,
2135    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2136    MAV_COMP_ID_USER65 = 89,
2137    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2138    MAV_COMP_ID_USER66 = 90,
2139    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2140    MAV_COMP_ID_USER67 = 91,
2141    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2142    MAV_COMP_ID_USER68 = 92,
2143    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2144    MAV_COMP_ID_USER69 = 93,
2145    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2146    MAV_COMP_ID_USER70 = 94,
2147    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2148    MAV_COMP_ID_USER71 = 95,
2149    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2150    MAV_COMP_ID_USER72 = 96,
2151    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2152    MAV_COMP_ID_USER73 = 97,
2153    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2154    MAV_COMP_ID_USER74 = 98,
2155    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2156    MAV_COMP_ID_USER75 = 99,
2157    #[doc = "Camera #1."]
2158    MAV_COMP_ID_CAMERA = 100,
2159    #[doc = "Camera #2."]
2160    MAV_COMP_ID_CAMERA2 = 101,
2161    #[doc = "Camera #3."]
2162    MAV_COMP_ID_CAMERA3 = 102,
2163    #[doc = "Camera #4."]
2164    MAV_COMP_ID_CAMERA4 = 103,
2165    #[doc = "Camera #5."]
2166    MAV_COMP_ID_CAMERA5 = 104,
2167    #[doc = "Camera #6."]
2168    MAV_COMP_ID_CAMERA6 = 105,
2169    #[doc = "Servo #1."]
2170    MAV_COMP_ID_SERVO1 = 140,
2171    #[doc = "Servo #2."]
2172    MAV_COMP_ID_SERVO2 = 141,
2173    #[doc = "Servo #3."]
2174    MAV_COMP_ID_SERVO3 = 142,
2175    #[doc = "Servo #4."]
2176    MAV_COMP_ID_SERVO4 = 143,
2177    #[doc = "Servo #5."]
2178    MAV_COMP_ID_SERVO5 = 144,
2179    #[doc = "Servo #6."]
2180    MAV_COMP_ID_SERVO6 = 145,
2181    #[doc = "Servo #7."]
2182    MAV_COMP_ID_SERVO7 = 146,
2183    #[doc = "Servo #8."]
2184    MAV_COMP_ID_SERVO8 = 147,
2185    #[doc = "Servo #9."]
2186    MAV_COMP_ID_SERVO9 = 148,
2187    #[doc = "Servo #10."]
2188    MAV_COMP_ID_SERVO10 = 149,
2189    #[doc = "Servo #11."]
2190    MAV_COMP_ID_SERVO11 = 150,
2191    #[doc = "Servo #12."]
2192    MAV_COMP_ID_SERVO12 = 151,
2193    #[doc = "Servo #13."]
2194    MAV_COMP_ID_SERVO13 = 152,
2195    #[doc = "Servo #14."]
2196    MAV_COMP_ID_SERVO14 = 153,
2197    #[doc = "Gimbal #1."]
2198    MAV_COMP_ID_GIMBAL = 154,
2199    #[doc = "Logging component."]
2200    MAV_COMP_ID_LOG = 155,
2201    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2202    MAV_COMP_ID_ADSB = 156,
2203    #[doc = "On Screen Display (OSD) devices for video links."]
2204    MAV_COMP_ID_OSD = 157,
2205    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2206    MAV_COMP_ID_PERIPHERAL = 158,
2207    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2208    #[doc = "Gimbal ID for QX1."]
2209    MAV_COMP_ID_QX1_GIMBAL = 159,
2210    #[doc = "FLARM collision alert component."]
2211    MAV_COMP_ID_FLARM = 160,
2212    #[doc = "Parachute component."]
2213    MAV_COMP_ID_PARACHUTE = 161,
2214    #[doc = "Winch component."]
2215    MAV_COMP_ID_WINCH = 169,
2216    #[doc = "Gimbal #2."]
2217    MAV_COMP_ID_GIMBAL2 = 171,
2218    #[doc = "Gimbal #3."]
2219    MAV_COMP_ID_GIMBAL3 = 172,
2220    #[doc = "Gimbal #4"]
2221    MAV_COMP_ID_GIMBAL4 = 173,
2222    #[doc = "Gimbal #5."]
2223    MAV_COMP_ID_GIMBAL5 = 174,
2224    #[doc = "Gimbal #6."]
2225    MAV_COMP_ID_GIMBAL6 = 175,
2226    #[doc = "Battery #1."]
2227    MAV_COMP_ID_BATTERY = 180,
2228    #[doc = "Battery #2."]
2229    MAV_COMP_ID_BATTERY2 = 181,
2230    #[doc = "CAN over MAVLink client."]
2231    MAV_COMP_ID_MAVCAN = 189,
2232    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2233    MAV_COMP_ID_MISSIONPLANNER = 190,
2234    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2235    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2236    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2237    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2238    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2239    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2240    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2241    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2242    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2243    MAV_COMP_ID_PATHPLANNER = 195,
2244    #[doc = "Component that plans a collision free path between two points."]
2245    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2246    #[doc = "Component that provides position estimates using VIO techniques."]
2247    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2248    #[doc = "Component that manages pairing of vehicle and GCS."]
2249    MAV_COMP_ID_PAIRING_MANAGER = 198,
2250    #[doc = "Inertial Measurement Unit (IMU) #1."]
2251    MAV_COMP_ID_IMU = 200,
2252    #[doc = "Inertial Measurement Unit (IMU) #2."]
2253    MAV_COMP_ID_IMU_2 = 201,
2254    #[doc = "Inertial Measurement Unit (IMU) #3."]
2255    MAV_COMP_ID_IMU_3 = 202,
2256    #[doc = "GPS #1."]
2257    MAV_COMP_ID_GPS = 220,
2258    #[doc = "GPS #2."]
2259    MAV_COMP_ID_GPS2 = 221,
2260    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2261    MAV_COMP_ID_ODID_TXRX_1 = 236,
2262    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2263    MAV_COMP_ID_ODID_TXRX_2 = 237,
2264    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2265    MAV_COMP_ID_ODID_TXRX_3 = 238,
2266    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2267    MAV_COMP_ID_UDP_BRIDGE = 240,
2268    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2269    MAV_COMP_ID_UART_BRIDGE = 241,
2270    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2271    MAV_COMP_ID_TUNNEL_NODE = 242,
2272    #[doc = "Illuminator"]
2273    MAV_COMP_ID_ILLUMINATOR = 243,
2274    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2275    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2276    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2277}
2278impl MavComponent {
2279    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2280}
2281impl Default for MavComponent {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2294#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2295pub enum MavDataStream {
2296    #[doc = "Enable all data streams"]
2297    MAV_DATA_STREAM_ALL = 0,
2298    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2299    MAV_DATA_STREAM_RAW_SENSORS = 1,
2300    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2301    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2302    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2303    MAV_DATA_STREAM_RC_CHANNELS = 3,
2304    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2305    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2306    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2307    MAV_DATA_STREAM_POSITION = 6,
2308    #[doc = "Dependent on the autopilot"]
2309    MAV_DATA_STREAM_EXTRA1 = 10,
2310    #[doc = "Dependent on the autopilot"]
2311    MAV_DATA_STREAM_EXTRA2 = 11,
2312    #[doc = "Dependent on the autopilot"]
2313    MAV_DATA_STREAM_EXTRA3 = 12,
2314}
2315impl MavDataStream {
2316    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2317}
2318impl Default for MavDataStream {
2319    fn default() -> Self {
2320        Self::DEFAULT
2321    }
2322}
2323#[cfg_attr(feature = "ts", derive(TS))]
2324#[cfg_attr(feature = "ts", ts(export))]
2325#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2327#[cfg_attr(feature = "serde", serde(tag = "type"))]
2328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2329#[repr(u32)]
2330#[doc = "Enumeration of distance sensor types"]
2331pub enum MavDistanceSensor {
2332    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2333    MAV_DISTANCE_SENSOR_LASER = 0,
2334    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2335    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2336    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2337    MAV_DISTANCE_SENSOR_INFRARED = 2,
2338    #[doc = "Radar type, e.g. uLanding units"]
2339    MAV_DISTANCE_SENSOR_RADAR = 3,
2340    #[doc = "Broken or unknown type, e.g. analog units"]
2341    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2342}
2343impl MavDistanceSensor {
2344    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2345}
2346impl Default for MavDistanceSensor {
2347    fn default() -> Self {
2348        Self::DEFAULT
2349    }
2350}
2351#[cfg_attr(feature = "ts", derive(TS))]
2352#[cfg_attr(feature = "ts", ts(export))]
2353#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2355#[cfg_attr(feature = "serde", serde(tag = "type"))]
2356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2357#[repr(u32)]
2358#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2359pub enum MavDoRepositionFlags {
2360    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2361    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2362}
2363impl MavDoRepositionFlags {
2364    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2365}
2366impl Default for MavDoRepositionFlags {
2367    fn default() -> Self {
2368        Self::DEFAULT
2369    }
2370}
2371#[cfg_attr(feature = "ts", derive(TS))]
2372#[cfg_attr(feature = "ts", ts(export))]
2373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2375#[cfg_attr(feature = "serde", serde(tag = "type"))]
2376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2377#[repr(u32)]
2378#[doc = "Enumeration of estimator types"]
2379pub enum MavEstimatorType {
2380    #[doc = "Unknown type of the estimator."]
2381    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2382    #[doc = "This is a naive estimator without any real covariance feedback."]
2383    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2384    #[doc = "Computer vision based estimate. Might be up to scale."]
2385    MAV_ESTIMATOR_TYPE_VISION = 2,
2386    #[doc = "Visual-inertial estimate."]
2387    MAV_ESTIMATOR_TYPE_VIO = 3,
2388    #[doc = "Plain GPS estimate."]
2389    MAV_ESTIMATOR_TYPE_GPS = 4,
2390    #[doc = "Estimator integrating GPS and inertial sensing."]
2391    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2392    #[doc = "Estimate from external motion capturing system."]
2393    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2394    #[doc = "Estimator based on lidar sensor input."]
2395    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2396    #[doc = "Estimator on autopilot."]
2397    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2398}
2399impl MavEstimatorType {
2400    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2401}
2402impl Default for MavEstimatorType {
2403    fn default() -> Self {
2404        Self::DEFAULT
2405    }
2406}
2407#[cfg_attr(feature = "ts", derive(TS))]
2408#[cfg_attr(feature = "ts", ts(export))]
2409#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2411#[cfg_attr(feature = "serde", serde(tag = "type"))]
2412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2413#[repr(u32)]
2414#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2415pub enum MavEventCurrentSequenceFlags {
2416    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2417    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2418}
2419impl MavEventCurrentSequenceFlags {
2420    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2421}
2422impl Default for MavEventCurrentSequenceFlags {
2423    fn default() -> Self {
2424        Self::DEFAULT
2425    }
2426}
2427#[cfg_attr(feature = "ts", derive(TS))]
2428#[cfg_attr(feature = "ts", ts(export))]
2429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2431#[cfg_attr(feature = "serde", serde(tag = "type"))]
2432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2433#[repr(u32)]
2434#[doc = "Reason for an event error response."]
2435pub enum MavEventErrorReason {
2436    #[doc = "The requested event is not available (anymore)."]
2437    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2438}
2439impl MavEventErrorReason {
2440    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2441}
2442impl Default for MavEventErrorReason {
2443    fn default() -> Self {
2444        Self::DEFAULT
2445    }
2446}
2447#[cfg_attr(feature = "ts", derive(TS))]
2448#[cfg_attr(feature = "ts", ts(export))]
2449#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2451#[cfg_attr(feature = "serde", serde(tag = "type"))]
2452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2453#[repr(u32)]
2454#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2455pub enum MavFrame {
2456    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2457    MAV_FRAME_GLOBAL = 0,
2458    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2459    MAV_FRAME_LOCAL_NED = 1,
2460    #[doc = "NOT a coordinate frame, indicates a mission command."]
2461    MAV_FRAME_MISSION = 2,
2462    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2463    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2464    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2465    MAV_FRAME_LOCAL_ENU = 4,
2466    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2467    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2468    MAV_FRAME_GLOBAL_INT = 5,
2469    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2470    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2471    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2472    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2473    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2474    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2475    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2476    MAV_FRAME_BODY_NED = 8,
2477    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2478    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2479    MAV_FRAME_BODY_OFFSET_NED = 9,
2480    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2481    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2482    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2483    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2484    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2485    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2486    MAV_FRAME_BODY_FRD = 12,
2487    #[deprecated = "  (Deprecated since 2019-04)"]
2488    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2489    MAV_FRAME_RESERVED_13 = 13,
2490    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2491    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2492    MAV_FRAME_RESERVED_14 = 14,
2493    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2494    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2495    MAV_FRAME_RESERVED_15 = 15,
2496    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2497    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2498    MAV_FRAME_RESERVED_16 = 16,
2499    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2500    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2501    MAV_FRAME_RESERVED_17 = 17,
2502    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2503    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2504    MAV_FRAME_RESERVED_18 = 18,
2505    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2506    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2507    MAV_FRAME_RESERVED_19 = 19,
2508    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2509    MAV_FRAME_LOCAL_FRD = 20,
2510    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2511    MAV_FRAME_LOCAL_FLU = 21,
2512}
2513impl MavFrame {
2514    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2515}
2516impl Default for MavFrame {
2517    fn default() -> Self {
2518        Self::DEFAULT
2519    }
2520}
2521#[cfg_attr(feature = "ts", derive(TS))]
2522#[cfg_attr(feature = "ts", ts(export))]
2523#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2525#[cfg_attr(feature = "serde", serde(tag = "type"))]
2526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2527#[repr(u32)]
2528#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2529pub enum MavFtpErr {
2530    #[doc = "None: No error"]
2531    MAV_FTP_ERR_NONE = 0,
2532    #[doc = "Fail: Unknown failure"]
2533    MAV_FTP_ERR_FAIL = 1,
2534    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2535    MAV_FTP_ERR_FAILERRNO = 2,
2536    #[doc = "InvalidDataSize: Payload size is invalid"]
2537    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2538    #[doc = "InvalidSession: Session is not currently open"]
2539    MAV_FTP_ERR_INVALIDSESSION = 4,
2540    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2541    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2542    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2543    MAV_FTP_ERR_EOF = 6,
2544    #[doc = "UnknownCommand: Unknown command / opcode"]
2545    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2546    #[doc = "FileExists: File/directory already exists"]
2547    MAV_FTP_ERR_FILEEXISTS = 8,
2548    #[doc = "FileProtected: File/directory is write protected"]
2549    MAV_FTP_ERR_FILEPROTECTED = 9,
2550    #[doc = "FileNotFound: File/directory not found"]
2551    MAV_FTP_ERR_FILENOTFOUND = 10,
2552}
2553impl MavFtpErr {
2554    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2555}
2556impl Default for MavFtpErr {
2557    fn default() -> Self {
2558        Self::DEFAULT
2559    }
2560}
2561#[cfg_attr(feature = "ts", derive(TS))]
2562#[cfg_attr(feature = "ts", ts(export))]
2563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2565#[cfg_attr(feature = "serde", serde(tag = "type"))]
2566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2567#[repr(u32)]
2568#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2569pub enum MavFtpOpcode {
2570    #[doc = "None. Ignored, always ACKed"]
2571    MAV_FTP_OPCODE_NONE = 0,
2572    #[doc = "TerminateSession: Terminates open Read session"]
2573    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2574    #[doc = "ResetSessions: Terminates all open read sessions"]
2575    MAV_FTP_OPCODE_RESETSESSION = 2,
2576    #[doc = "ListDirectory. List files and directories in path from offset"]
2577    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2578    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2579    MAV_FTP_OPCODE_OPENFILERO = 4,
2580    #[doc = "ReadFile: Reads size bytes from offset in session"]
2581    MAV_FTP_OPCODE_READFILE = 5,
2582    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2583    MAV_FTP_OPCODE_CREATEFILE = 6,
2584    #[doc = "WriteFile: Writes size bytes to offset in session"]
2585    MAV_FTP_OPCODE_WRITEFILE = 7,
2586    #[doc = "RemoveFile: Remove file at path"]
2587    MAV_FTP_OPCODE_REMOVEFILE = 8,
2588    #[doc = "CreateDirectory: Creates directory at path"]
2589    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2590    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2591    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2592    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2593    MAV_FTP_OPCODE_OPENFILEWO = 11,
2594    #[doc = "TruncateFile: Truncate file at path to offset length"]
2595    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2596    #[doc = "Rename: Rename path1 to path2"]
2597    MAV_FTP_OPCODE_RENAME = 13,
2598    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2599    MAV_FTP_OPCODE_CALCFILECRC = 14,
2600    #[doc = "BurstReadFile: Burst download session file"]
2601    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2602    #[doc = "ACK: ACK response"]
2603    MAV_FTP_OPCODE_ACK = 128,
2604    #[doc = "NAK: NAK response"]
2605    MAV_FTP_OPCODE_NAK = 129,
2606}
2607impl MavFtpOpcode {
2608    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2609}
2610impl Default for MavFtpOpcode {
2611    fn default() -> Self {
2612        Self::DEFAULT
2613    }
2614}
2615#[cfg_attr(feature = "ts", derive(TS))]
2616#[cfg_attr(feature = "ts", ts(export))]
2617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2619#[cfg_attr(feature = "serde", serde(tag = "type"))]
2620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2621#[repr(u32)]
2622#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2623pub enum MavFuelType {
2624    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2625    MAV_FUEL_TYPE_UNKNOWN = 0,
2626    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2627    MAV_FUEL_TYPE_LIQUID = 1,
2628    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2629    MAV_FUEL_TYPE_GAS = 2,
2630}
2631impl MavFuelType {
2632    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2633}
2634impl Default for MavFuelType {
2635    fn default() -> Self {
2636        Self::DEFAULT
2637    }
2638}
2639bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2640impl MavGeneratorStatusFlag {
2641    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2642}
2643impl Default for MavGeneratorStatusFlag {
2644    fn default() -> Self {
2645        Self::DEFAULT
2646    }
2647}
2648#[cfg_attr(feature = "ts", derive(TS))]
2649#[cfg_attr(feature = "ts", ts(export))]
2650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2652#[cfg_attr(feature = "serde", serde(tag = "type"))]
2653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2654#[repr(u32)]
2655#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2656pub enum MavGoto {
2657    #[doc = "Hold at the current position."]
2658    MAV_GOTO_DO_HOLD = 0,
2659    #[doc = "Continue with the next item in mission execution."]
2660    MAV_GOTO_DO_CONTINUE = 1,
2661    #[doc = "Hold at the current position of the system"]
2662    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2663    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2664    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2665}
2666impl MavGoto {
2667    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2668}
2669impl Default for MavGoto {
2670    fn default() -> Self {
2671        Self::DEFAULT
2672    }
2673}
2674#[cfg_attr(feature = "ts", derive(TS))]
2675#[cfg_attr(feature = "ts", ts(export))]
2676#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2678#[cfg_attr(feature = "serde", serde(tag = "type"))]
2679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2680#[repr(u32)]
2681#[doc = "Enumeration of landed detector states"]
2682pub enum MavLandedState {
2683    #[doc = "MAV landed state is unknown"]
2684    MAV_LANDED_STATE_UNDEFINED = 0,
2685    #[doc = "MAV is landed (on ground)"]
2686    MAV_LANDED_STATE_ON_GROUND = 1,
2687    #[doc = "MAV is in air"]
2688    MAV_LANDED_STATE_IN_AIR = 2,
2689    #[doc = "MAV currently taking off"]
2690    MAV_LANDED_STATE_TAKEOFF = 3,
2691    #[doc = "MAV currently landing"]
2692    MAV_LANDED_STATE_LANDING = 4,
2693}
2694impl MavLandedState {
2695    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2696}
2697impl Default for MavLandedState {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702#[cfg_attr(feature = "ts", derive(TS))]
2703#[cfg_attr(feature = "ts", ts(export))]
2704#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2706#[cfg_attr(feature = "serde", serde(tag = "type"))]
2707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2708#[repr(u32)]
2709#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2710pub enum MavMissionResult {
2711    #[doc = "mission accepted OK"]
2712    MAV_MISSION_ACCEPTED = 0,
2713    #[doc = "Generic error / not accepting mission commands at all right now."]
2714    MAV_MISSION_ERROR = 1,
2715    #[doc = "Coordinate frame is not supported."]
2716    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2717    #[doc = "Command is not supported."]
2718    MAV_MISSION_UNSUPPORTED = 3,
2719    #[doc = "Mission items exceed storage space."]
2720    MAV_MISSION_NO_SPACE = 4,
2721    #[doc = "One of the parameters has an invalid value."]
2722    MAV_MISSION_INVALID = 5,
2723    #[doc = "param1 has an invalid value."]
2724    MAV_MISSION_INVALID_PARAM1 = 6,
2725    #[doc = "param2 has an invalid value."]
2726    MAV_MISSION_INVALID_PARAM2 = 7,
2727    #[doc = "param3 has an invalid value."]
2728    MAV_MISSION_INVALID_PARAM3 = 8,
2729    #[doc = "param4 has an invalid value."]
2730    MAV_MISSION_INVALID_PARAM4 = 9,
2731    #[doc = "x / param5 has an invalid value."]
2732    MAV_MISSION_INVALID_PARAM5_X = 10,
2733    #[doc = "y / param6 has an invalid value."]
2734    MAV_MISSION_INVALID_PARAM6_Y = 11,
2735    #[doc = "z / param7 has an invalid value."]
2736    MAV_MISSION_INVALID_PARAM7 = 12,
2737    #[doc = "Mission item received out of sequence"]
2738    MAV_MISSION_INVALID_SEQUENCE = 13,
2739    #[doc = "Not accepting any mission commands from this communication partner."]
2740    MAV_MISSION_DENIED = 14,
2741    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2742    MAV_MISSION_OPERATION_CANCELLED = 15,
2743}
2744impl MavMissionResult {
2745    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2746}
2747impl Default for MavMissionResult {
2748    fn default() -> Self {
2749        Self::DEFAULT
2750    }
2751}
2752#[cfg_attr(feature = "ts", derive(TS))]
2753#[cfg_attr(feature = "ts", ts(export))]
2754#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2756#[cfg_attr(feature = "serde", serde(tag = "type"))]
2757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2758#[repr(u32)]
2759#[doc = "Type of mission items being requested/sent in mission protocol."]
2760pub enum MavMissionType {
2761    #[doc = "Items are mission commands for main mission."]
2762    MAV_MISSION_TYPE_MISSION = 0,
2763    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2764    MAV_MISSION_TYPE_FENCE = 1,
2765    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2766    MAV_MISSION_TYPE_RALLY = 2,
2767    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2768    MAV_MISSION_TYPE_ALL = 255,
2769}
2770impl MavMissionType {
2771    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2772}
2773impl Default for MavMissionType {
2774    fn default() -> Self {
2775        Self::DEFAULT
2776    }
2777}
2778#[cfg_attr(feature = "ts", derive(TS))]
2779#[cfg_attr(feature = "ts", ts(export))]
2780#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2782#[cfg_attr(feature = "serde", serde(tag = "type"))]
2783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2784#[repr(u32)]
2785#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2786pub enum MavMode {
2787    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2788    MAV_MODE_PREFLIGHT = 0,
2789    #[doc = "System is allowed to be active, under assisted RC control."]
2790    MAV_MODE_STABILIZE_DISARMED = 80,
2791    #[doc = "System is allowed to be active, under assisted RC control."]
2792    MAV_MODE_STABILIZE_ARMED = 208,
2793    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2794    MAV_MODE_MANUAL_DISARMED = 64,
2795    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2796    MAV_MODE_MANUAL_ARMED = 192,
2797    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2798    MAV_MODE_GUIDED_DISARMED = 88,
2799    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2800    MAV_MODE_GUIDED_ARMED = 216,
2801    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2802    MAV_MODE_AUTO_DISARMED = 92,
2803    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2804    MAV_MODE_AUTO_ARMED = 220,
2805    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2806    MAV_MODE_TEST_DISARMED = 66,
2807    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2808    MAV_MODE_TEST_ARMED = 194,
2809}
2810impl MavMode {
2811    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2812}
2813impl Default for MavMode {
2814    fn default() -> Self {
2815        Self::DEFAULT
2816    }
2817}
2818bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2819impl MavModeFlag {
2820    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2821}
2822impl Default for MavModeFlag {
2823    fn default() -> Self {
2824        Self::DEFAULT
2825    }
2826}
2827#[cfg_attr(feature = "ts", derive(TS))]
2828#[cfg_attr(feature = "ts", ts(export))]
2829#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2831#[cfg_attr(feature = "serde", serde(tag = "type"))]
2832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2833#[repr(u32)]
2834#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2835pub enum MavModeFlagDecodePosition {
2836    #[doc = "First bit:  10000000"]
2837    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2838    #[doc = "Second bit: 01000000"]
2839    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2840    #[doc = "Third bit:  00100000"]
2841    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2842    #[doc = "Fourth bit: 00010000"]
2843    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2844    #[doc = "Fifth bit:  00001000"]
2845    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2846    #[doc = "Sixth bit:   00000100"]
2847    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2848    #[doc = "Seventh bit: 00000010"]
2849    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2850    #[doc = "Eighth bit: 00000001"]
2851    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2852}
2853impl MavModeFlagDecodePosition {
2854    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2855}
2856impl Default for MavModeFlagDecodePosition {
2857    fn default() -> Self {
2858        Self::DEFAULT
2859    }
2860}
2861bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2862impl MavModeProperty {
2863    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2864}
2865impl Default for MavModeProperty {
2866    fn default() -> Self {
2867        Self::DEFAULT
2868    }
2869}
2870#[cfg_attr(feature = "ts", derive(TS))]
2871#[cfg_attr(feature = "ts", ts(export))]
2872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2874#[cfg_attr(feature = "serde", serde(tag = "type"))]
2875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2876#[repr(u32)]
2877#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2878#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2879pub enum MavMountMode {
2880    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2881    MAV_MOUNT_MODE_RETRACT = 0,
2882    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2883    MAV_MOUNT_MODE_NEUTRAL = 1,
2884    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2885    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2886    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2887    MAV_MOUNT_MODE_RC_TARGETING = 3,
2888    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2889    MAV_MOUNT_MODE_GPS_POINT = 4,
2890    #[doc = "Gimbal tracks system with specified system ID"]
2891    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2892    #[doc = "Gimbal tracks home position"]
2893    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2894}
2895impl MavMountMode {
2896    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2897}
2898impl Default for MavMountMode {
2899    fn default() -> Self {
2900        Self::DEFAULT
2901    }
2902}
2903#[cfg_attr(feature = "ts", derive(TS))]
2904#[cfg_attr(feature = "ts", ts(export))]
2905#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2907#[cfg_attr(feature = "serde", serde(tag = "type"))]
2908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2909#[repr(u32)]
2910pub enum MavOdidArmStatus {
2911    #[doc = "Passing arming checks."]
2912    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2913    #[doc = "Generic arming failure, see error string for details."]
2914    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2915}
2916impl MavOdidArmStatus {
2917    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2918}
2919impl Default for MavOdidArmStatus {
2920    fn default() -> Self {
2921        Self::DEFAULT
2922    }
2923}
2924#[cfg_attr(feature = "ts", derive(TS))]
2925#[cfg_attr(feature = "ts", ts(export))]
2926#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2928#[cfg_attr(feature = "serde", serde(tag = "type"))]
2929#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2930#[repr(u32)]
2931pub enum MavOdidAuthType {
2932    #[doc = "No authentication type is specified."]
2933    MAV_ODID_AUTH_TYPE_NONE = 0,
2934    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2935    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2936    #[doc = "Signature for the Operator ID."]
2937    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2938    #[doc = "Signature for the entire message set."]
2939    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2940    #[doc = "Authentication is provided by Network Remote ID."]
2941    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2942    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2943    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2944}
2945impl MavOdidAuthType {
2946    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2947}
2948impl Default for MavOdidAuthType {
2949    fn default() -> Self {
2950        Self::DEFAULT
2951    }
2952}
2953#[cfg_attr(feature = "ts", derive(TS))]
2954#[cfg_attr(feature = "ts", ts(export))]
2955#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2957#[cfg_attr(feature = "serde", serde(tag = "type"))]
2958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2959#[repr(u32)]
2960pub enum MavOdidCategoryEu {
2961    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2962    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2963    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2964    MAV_ODID_CATEGORY_EU_OPEN = 1,
2965    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2966    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2967    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2968    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2969}
2970impl MavOdidCategoryEu {
2971    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2972}
2973impl Default for MavOdidCategoryEu {
2974    fn default() -> Self {
2975        Self::DEFAULT
2976    }
2977}
2978#[cfg_attr(feature = "ts", derive(TS))]
2979#[cfg_attr(feature = "ts", ts(export))]
2980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2982#[cfg_attr(feature = "serde", serde(tag = "type"))]
2983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2984#[repr(u32)]
2985pub enum MavOdidClassEu {
2986    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2987    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2988    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2989    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2990    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2991    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2992    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2993    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2994    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2995    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2996    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2997    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2998    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2999    MAV_ODID_CLASS_EU_CLASS_5 = 6,
3000    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
3001    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3002}
3003impl MavOdidClassEu {
3004    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3005}
3006impl Default for MavOdidClassEu {
3007    fn default() -> Self {
3008        Self::DEFAULT
3009    }
3010}
3011#[cfg_attr(feature = "ts", derive(TS))]
3012#[cfg_attr(feature = "ts", ts(export))]
3013#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3015#[cfg_attr(feature = "serde", serde(tag = "type"))]
3016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3017#[repr(u32)]
3018pub enum MavOdidClassificationType {
3019    #[doc = "The classification type for the UA is undeclared."]
3020    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3021    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3022    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3023}
3024impl MavOdidClassificationType {
3025    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3026}
3027impl Default for MavOdidClassificationType {
3028    fn default() -> Self {
3029        Self::DEFAULT
3030    }
3031}
3032#[cfg_attr(feature = "ts", derive(TS))]
3033#[cfg_attr(feature = "ts", ts(export))]
3034#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3036#[cfg_attr(feature = "serde", serde(tag = "type"))]
3037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3038#[repr(u32)]
3039pub enum MavOdidDescType {
3040    #[doc = "Optional free-form text description of the purpose of the flight."]
3041    MAV_ODID_DESC_TYPE_TEXT = 0,
3042    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3043    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3044    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3045    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3046}
3047impl MavOdidDescType {
3048    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3049}
3050impl Default for MavOdidDescType {
3051    fn default() -> Self {
3052        Self::DEFAULT
3053    }
3054}
3055#[cfg_attr(feature = "ts", derive(TS))]
3056#[cfg_attr(feature = "ts", ts(export))]
3057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3059#[cfg_attr(feature = "serde", serde(tag = "type"))]
3060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3061#[repr(u32)]
3062pub enum MavOdidHeightRef {
3063    #[doc = "The height field is relative to the take-off location."]
3064    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3065    #[doc = "The height field is relative to ground."]
3066    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3067}
3068impl MavOdidHeightRef {
3069    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3070}
3071impl Default for MavOdidHeightRef {
3072    fn default() -> Self {
3073        Self::DEFAULT
3074    }
3075}
3076#[cfg_attr(feature = "ts", derive(TS))]
3077#[cfg_attr(feature = "ts", ts(export))]
3078#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3080#[cfg_attr(feature = "serde", serde(tag = "type"))]
3081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3082#[repr(u32)]
3083pub enum MavOdidHorAcc {
3084    #[doc = "The horizontal accuracy is unknown."]
3085    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3086    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3087    MAV_ODID_HOR_ACC_10NM = 1,
3088    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3089    MAV_ODID_HOR_ACC_4NM = 2,
3090    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3091    MAV_ODID_HOR_ACC_2NM = 3,
3092    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3093    MAV_ODID_HOR_ACC_1NM = 4,
3094    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3095    MAV_ODID_HOR_ACC_0_5NM = 5,
3096    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3097    MAV_ODID_HOR_ACC_0_3NM = 6,
3098    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3099    MAV_ODID_HOR_ACC_0_1NM = 7,
3100    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3101    MAV_ODID_HOR_ACC_0_05NM = 8,
3102    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3103    MAV_ODID_HOR_ACC_30_METER = 9,
3104    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3105    MAV_ODID_HOR_ACC_10_METER = 10,
3106    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3107    MAV_ODID_HOR_ACC_3_METER = 11,
3108    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3109    MAV_ODID_HOR_ACC_1_METER = 12,
3110}
3111impl MavOdidHorAcc {
3112    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3113}
3114impl Default for MavOdidHorAcc {
3115    fn default() -> Self {
3116        Self::DEFAULT
3117    }
3118}
3119#[cfg_attr(feature = "ts", derive(TS))]
3120#[cfg_attr(feature = "ts", ts(export))]
3121#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3123#[cfg_attr(feature = "serde", serde(tag = "type"))]
3124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3125#[repr(u32)]
3126pub enum MavOdidIdType {
3127    #[doc = "No type defined."]
3128    MAV_ODID_ID_TYPE_NONE = 0,
3129    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3130    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3131    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3132    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3133    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3134    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3135    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3136    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3137}
3138impl MavOdidIdType {
3139    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3140}
3141impl Default for MavOdidIdType {
3142    fn default() -> Self {
3143        Self::DEFAULT
3144    }
3145}
3146#[cfg_attr(feature = "ts", derive(TS))]
3147#[cfg_attr(feature = "ts", ts(export))]
3148#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3150#[cfg_attr(feature = "serde", serde(tag = "type"))]
3151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3152#[repr(u32)]
3153pub enum MavOdidOperatorIdType {
3154    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3155    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3156}
3157impl MavOdidOperatorIdType {
3158    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3159}
3160impl Default for MavOdidOperatorIdType {
3161    fn default() -> Self {
3162        Self::DEFAULT
3163    }
3164}
3165#[cfg_attr(feature = "ts", derive(TS))]
3166#[cfg_attr(feature = "ts", ts(export))]
3167#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3169#[cfg_attr(feature = "serde", serde(tag = "type"))]
3170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3171#[repr(u32)]
3172pub enum MavOdidOperatorLocationType {
3173    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3174    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3175    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3176    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3177    #[doc = "The location/altitude of the operator are fixed values."]
3178    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3179}
3180impl MavOdidOperatorLocationType {
3181    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3182}
3183impl Default for MavOdidOperatorLocationType {
3184    fn default() -> Self {
3185        Self::DEFAULT
3186    }
3187}
3188#[cfg_attr(feature = "ts", derive(TS))]
3189#[cfg_attr(feature = "ts", ts(export))]
3190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3192#[cfg_attr(feature = "serde", serde(tag = "type"))]
3193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3194#[repr(u32)]
3195pub enum MavOdidSpeedAcc {
3196    #[doc = "The speed accuracy is unknown."]
3197    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3198    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3199    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3200    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3201    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3202    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3203    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3204    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3205    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3206}
3207impl MavOdidSpeedAcc {
3208    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3209}
3210impl Default for MavOdidSpeedAcc {
3211    fn default() -> Self {
3212        Self::DEFAULT
3213    }
3214}
3215#[cfg_attr(feature = "ts", derive(TS))]
3216#[cfg_attr(feature = "ts", ts(export))]
3217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3219#[cfg_attr(feature = "serde", serde(tag = "type"))]
3220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3221#[repr(u32)]
3222pub enum MavOdidStatus {
3223    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3224    MAV_ODID_STATUS_UNDECLARED = 0,
3225    #[doc = "The UA is on the ground."]
3226    MAV_ODID_STATUS_GROUND = 1,
3227    #[doc = "The UA is in the air."]
3228    MAV_ODID_STATUS_AIRBORNE = 2,
3229    #[doc = "The UA is having an emergency."]
3230    MAV_ODID_STATUS_EMERGENCY = 3,
3231    #[doc = "The remote ID system is failing or unreliable in some way."]
3232    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3233}
3234impl MavOdidStatus {
3235    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3236}
3237impl Default for MavOdidStatus {
3238    fn default() -> Self {
3239        Self::DEFAULT
3240    }
3241}
3242#[cfg_attr(feature = "ts", derive(TS))]
3243#[cfg_attr(feature = "ts", ts(export))]
3244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3246#[cfg_attr(feature = "serde", serde(tag = "type"))]
3247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3248#[repr(u32)]
3249pub enum MavOdidTimeAcc {
3250    #[doc = "The timestamp accuracy is unknown."]
3251    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3252    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3253    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3254    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3255    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3256    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3257    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3258    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3259    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3260    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3261    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3262    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3263    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3264    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3265    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3266    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3267    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3268    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3269    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3270    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3271    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3272    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3273    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3274    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3275    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3276    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3277    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3278    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3279    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3280    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3281    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3282}
3283impl MavOdidTimeAcc {
3284    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3285}
3286impl Default for MavOdidTimeAcc {
3287    fn default() -> Self {
3288        Self::DEFAULT
3289    }
3290}
3291#[cfg_attr(feature = "ts", derive(TS))]
3292#[cfg_attr(feature = "ts", ts(export))]
3293#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3295#[cfg_attr(feature = "serde", serde(tag = "type"))]
3296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3297#[repr(u32)]
3298pub enum MavOdidUaType {
3299    #[doc = "No UA (Unmanned Aircraft) type defined."]
3300    MAV_ODID_UA_TYPE_NONE = 0,
3301    #[doc = "Aeroplane/Airplane. Fixed wing."]
3302    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3303    #[doc = "Helicopter or multirotor."]
3304    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3305    #[doc = "Gyroplane."]
3306    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3307    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3308    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3309    #[doc = "Ornithopter."]
3310    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3311    #[doc = "Glider."]
3312    MAV_ODID_UA_TYPE_GLIDER = 6,
3313    #[doc = "Kite."]
3314    MAV_ODID_UA_TYPE_KITE = 7,
3315    #[doc = "Free Balloon."]
3316    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3317    #[doc = "Captive Balloon."]
3318    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3319    #[doc = "Airship. E.g. a blimp."]
3320    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3321    #[doc = "Free Fall/Parachute (unpowered)."]
3322    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3323    #[doc = "Rocket."]
3324    MAV_ODID_UA_TYPE_ROCKET = 12,
3325    #[doc = "Tethered powered aircraft."]
3326    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3327    #[doc = "Ground Obstacle."]
3328    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3329    #[doc = "Other type of aircraft not listed earlier."]
3330    MAV_ODID_UA_TYPE_OTHER = 15,
3331}
3332impl MavOdidUaType {
3333    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3334}
3335impl Default for MavOdidUaType {
3336    fn default() -> Self {
3337        Self::DEFAULT
3338    }
3339}
3340#[cfg_attr(feature = "ts", derive(TS))]
3341#[cfg_attr(feature = "ts", ts(export))]
3342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3344#[cfg_attr(feature = "serde", serde(tag = "type"))]
3345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3346#[repr(u32)]
3347pub enum MavOdidVerAcc {
3348    #[doc = "The vertical accuracy is unknown."]
3349    MAV_ODID_VER_ACC_UNKNOWN = 0,
3350    #[doc = "The vertical accuracy is smaller than 150 meter."]
3351    MAV_ODID_VER_ACC_150_METER = 1,
3352    #[doc = "The vertical accuracy is smaller than 45 meter."]
3353    MAV_ODID_VER_ACC_45_METER = 2,
3354    #[doc = "The vertical accuracy is smaller than 25 meter."]
3355    MAV_ODID_VER_ACC_25_METER = 3,
3356    #[doc = "The vertical accuracy is smaller than 10 meter."]
3357    MAV_ODID_VER_ACC_10_METER = 4,
3358    #[doc = "The vertical accuracy is smaller than 3 meter."]
3359    MAV_ODID_VER_ACC_3_METER = 5,
3360    #[doc = "The vertical accuracy is smaller than 1 meter."]
3361    MAV_ODID_VER_ACC_1_METER = 6,
3362}
3363impl MavOdidVerAcc {
3364    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3365}
3366impl Default for MavOdidVerAcc {
3367    fn default() -> Self {
3368        Self::DEFAULT
3369    }
3370}
3371#[cfg_attr(feature = "ts", derive(TS))]
3372#[cfg_attr(feature = "ts", ts(export))]
3373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3375#[cfg_attr(feature = "serde", serde(tag = "type"))]
3376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3377#[repr(u32)]
3378#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3379pub enum MavParamExtType {
3380    #[doc = "8-bit unsigned integer"]
3381    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3382    #[doc = "8-bit signed integer"]
3383    MAV_PARAM_EXT_TYPE_INT8 = 2,
3384    #[doc = "16-bit unsigned integer"]
3385    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3386    #[doc = "16-bit signed integer"]
3387    MAV_PARAM_EXT_TYPE_INT16 = 4,
3388    #[doc = "32-bit unsigned integer"]
3389    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3390    #[doc = "32-bit signed integer"]
3391    MAV_PARAM_EXT_TYPE_INT32 = 6,
3392    #[doc = "64-bit unsigned integer"]
3393    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3394    #[doc = "64-bit signed integer"]
3395    MAV_PARAM_EXT_TYPE_INT64 = 8,
3396    #[doc = "32-bit floating-point"]
3397    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3398    #[doc = "64-bit floating-point"]
3399    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3400    #[doc = "Custom Type"]
3401    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3402}
3403impl MavParamExtType {
3404    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3405}
3406impl Default for MavParamExtType {
3407    fn default() -> Self {
3408        Self::DEFAULT
3409    }
3410}
3411#[cfg_attr(feature = "ts", derive(TS))]
3412#[cfg_attr(feature = "ts", ts(export))]
3413#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3415#[cfg_attr(feature = "serde", serde(tag = "type"))]
3416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3417#[repr(u32)]
3418#[doc = "Specifies the datatype of a MAVLink parameter."]
3419pub enum MavParamType {
3420    #[doc = "8-bit unsigned integer"]
3421    MAV_PARAM_TYPE_UINT8 = 1,
3422    #[doc = "8-bit signed integer"]
3423    MAV_PARAM_TYPE_INT8 = 2,
3424    #[doc = "16-bit unsigned integer"]
3425    MAV_PARAM_TYPE_UINT16 = 3,
3426    #[doc = "16-bit signed integer"]
3427    MAV_PARAM_TYPE_INT16 = 4,
3428    #[doc = "32-bit unsigned integer"]
3429    MAV_PARAM_TYPE_UINT32 = 5,
3430    #[doc = "32-bit signed integer"]
3431    MAV_PARAM_TYPE_INT32 = 6,
3432    #[doc = "64-bit unsigned integer"]
3433    MAV_PARAM_TYPE_UINT64 = 7,
3434    #[doc = "64-bit signed integer"]
3435    MAV_PARAM_TYPE_INT64 = 8,
3436    #[doc = "32-bit floating-point"]
3437    MAV_PARAM_TYPE_REAL32 = 9,
3438    #[doc = "64-bit floating-point"]
3439    MAV_PARAM_TYPE_REAL64 = 10,
3440}
3441impl MavParamType {
3442    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3443}
3444impl Default for MavParamType {
3445    fn default() -> Self {
3446        Self::DEFAULT
3447    }
3448}
3449bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3450impl MavPowerStatus {
3451    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3452}
3453impl Default for MavPowerStatus {
3454    fn default() -> Self {
3455        Self::DEFAULT
3456    }
3457}
3458bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3459impl MavProtocolCapability {
3460    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3461}
3462impl Default for MavProtocolCapability {
3463    fn default() -> Self {
3464        Self::DEFAULT
3465    }
3466}
3467#[cfg_attr(feature = "ts", derive(TS))]
3468#[cfg_attr(feature = "ts", ts(export))]
3469#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3471#[cfg_attr(feature = "serde", serde(tag = "type"))]
3472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3473#[repr(u32)]
3474#[doc = "Result from a MAVLink command (MAV_CMD)"]
3475pub enum MavResult {
3476    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3477    MAV_RESULT_ACCEPTED = 0,
3478    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3479    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3480    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3481    MAV_RESULT_DENIED = 2,
3482    #[doc = "Command is not supported (unknown)."]
3483    MAV_RESULT_UNSUPPORTED = 3,
3484    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3485    MAV_RESULT_FAILED = 4,
3486    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3487    MAV_RESULT_IN_PROGRESS = 5,
3488    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3489    MAV_RESULT_CANCELLED = 6,
3490    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3491    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3492    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3493    MAV_RESULT_COMMAND_INT_ONLY = 8,
3494    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3495    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3496}
3497impl MavResult {
3498    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3499}
3500impl Default for MavResult {
3501    fn default() -> Self {
3502        Self::DEFAULT
3503    }
3504}
3505#[cfg_attr(feature = "ts", derive(TS))]
3506#[cfg_attr(feature = "ts", ts(export))]
3507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3509#[cfg_attr(feature = "serde", serde(tag = "type"))]
3510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3511#[repr(u32)]
3512#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3513#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3514pub enum MavRoi {
3515    #[doc = "No region of interest."]
3516    MAV_ROI_NONE = 0,
3517    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3518    MAV_ROI_WPNEXT = 1,
3519    #[doc = "Point toward given waypoint."]
3520    MAV_ROI_WPINDEX = 2,
3521    #[doc = "Point toward fixed location."]
3522    MAV_ROI_LOCATION = 3,
3523    #[doc = "Point toward of given id."]
3524    MAV_ROI_TARGET = 4,
3525}
3526impl MavRoi {
3527    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3528}
3529impl Default for MavRoi {
3530    fn default() -> Self {
3531        Self::DEFAULT
3532    }
3533}
3534#[cfg_attr(feature = "ts", derive(TS))]
3535#[cfg_attr(feature = "ts", ts(export))]
3536#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3538#[cfg_attr(feature = "serde", serde(tag = "type"))]
3539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3540#[repr(u32)]
3541#[doc = "Enumeration of sensor orientation, according to its rotations"]
3542pub enum MavSensorOrientation {
3543    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3544    MAV_SENSOR_ROTATION_NONE = 0,
3545    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3546    MAV_SENSOR_ROTATION_YAW_45 = 1,
3547    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3548    MAV_SENSOR_ROTATION_YAW_90 = 2,
3549    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3550    MAV_SENSOR_ROTATION_YAW_135 = 3,
3551    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3552    MAV_SENSOR_ROTATION_YAW_180 = 4,
3553    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3554    MAV_SENSOR_ROTATION_YAW_225 = 5,
3555    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3556    MAV_SENSOR_ROTATION_YAW_270 = 6,
3557    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3558    MAV_SENSOR_ROTATION_YAW_315 = 7,
3559    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3560    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3561    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3562    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3563    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3564    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3565    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3566    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3567    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3568    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3569    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3570    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3571    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3572    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3573    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3574    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3575    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3576    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3577    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3578    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3579    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3580    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3581    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3582    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3583    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3584    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3585    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3586    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3587    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3588    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3589    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3590    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3591    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3592    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3593    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3594    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3595    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3596    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3597    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3598    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3599    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3600    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3601    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3602    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3603    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3604    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3605    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3606    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3607    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3608    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3609    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3610    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3611    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3612    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3613    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3614    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3615    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3616    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3617    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3618    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3619    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3620    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3621    #[doc = "Pitch: 315"]
3622    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3623    #[doc = "Roll: 90, Pitch: 315"]
3624    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3625    #[doc = "Custom orientation"]
3626    MAV_SENSOR_ROTATION_CUSTOM = 100,
3627}
3628impl MavSensorOrientation {
3629    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3630}
3631impl Default for MavSensorOrientation {
3632    fn default() -> Self {
3633        Self::DEFAULT
3634    }
3635}
3636#[cfg_attr(feature = "ts", derive(TS))]
3637#[cfg_attr(feature = "ts", ts(export))]
3638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3640#[cfg_attr(feature = "serde", serde(tag = "type"))]
3641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3642#[repr(u32)]
3643#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3644pub enum MavSeverity {
3645    #[doc = "System is unusable. This is a \"panic\" condition."]
3646    MAV_SEVERITY_EMERGENCY = 0,
3647    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3648    MAV_SEVERITY_ALERT = 1,
3649    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3650    MAV_SEVERITY_CRITICAL = 2,
3651    #[doc = "Indicates an error in secondary/redundant systems."]
3652    MAV_SEVERITY_ERROR = 3,
3653    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3654    MAV_SEVERITY_WARNING = 4,
3655    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3656    MAV_SEVERITY_NOTICE = 5,
3657    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3658    MAV_SEVERITY_INFO = 6,
3659    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3660    MAV_SEVERITY_DEBUG = 7,
3661}
3662impl MavSeverity {
3663    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3664}
3665impl Default for MavSeverity {
3666    fn default() -> Self {
3667        Self::DEFAULT
3668    }
3669}
3670#[cfg_attr(feature = "ts", derive(TS))]
3671#[cfg_attr(feature = "ts", ts(export))]
3672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3674#[cfg_attr(feature = "serde", serde(tag = "type"))]
3675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3676#[repr(u32)]
3677#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3678pub enum MavStandardMode {
3679    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3680    MAV_STANDARD_MODE_NON_STANDARD = 0,
3681    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3682    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3683    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3684    MAV_STANDARD_MODE_ORBIT = 2,
3685    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3686    MAV_STANDARD_MODE_CRUISE = 3,
3687    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3688    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3689    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3690    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3691    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3692    MAV_STANDARD_MODE_MISSION = 6,
3693    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3694    MAV_STANDARD_MODE_LAND = 7,
3695    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3696    MAV_STANDARD_MODE_TAKEOFF = 8,
3697}
3698impl MavStandardMode {
3699    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3700}
3701impl Default for MavStandardMode {
3702    fn default() -> Self {
3703        Self::DEFAULT
3704    }
3705}
3706#[cfg_attr(feature = "ts", derive(TS))]
3707#[cfg_attr(feature = "ts", ts(export))]
3708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3710#[cfg_attr(feature = "serde", serde(tag = "type"))]
3711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3712#[repr(u32)]
3713pub enum MavState {
3714    #[doc = "Uninitialized system, state is unknown."]
3715    MAV_STATE_UNINIT = 0,
3716    #[doc = "System is booting up."]
3717    MAV_STATE_BOOT = 1,
3718    #[doc = "System is calibrating and not flight-ready."]
3719    MAV_STATE_CALIBRATING = 2,
3720    #[doc = "System is grounded and on standby. It can be launched any time."]
3721    MAV_STATE_STANDBY = 3,
3722    #[doc = "System is active and might be already airborne. Motors are engaged."]
3723    MAV_STATE_ACTIVE = 4,
3724    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3725    MAV_STATE_CRITICAL = 5,
3726    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3727    MAV_STATE_EMERGENCY = 6,
3728    #[doc = "System just initialized its power-down sequence, will shut down now."]
3729    MAV_STATE_POWEROFF = 7,
3730    #[doc = "System is terminating itself (failsafe or commanded)."]
3731    MAV_STATE_FLIGHT_TERMINATION = 8,
3732}
3733impl MavState {
3734    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3735}
3736impl Default for MavState {
3737    fn default() -> Self {
3738        Self::DEFAULT
3739    }
3740}
3741bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3742impl MavSysStatusSensor {
3743    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3744}
3745impl Default for MavSysStatusSensor {
3746    fn default() -> Self {
3747        Self::DEFAULT
3748    }
3749}
3750bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3751impl MavSysStatusSensorExtended {
3752    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3753}
3754impl Default for MavSysStatusSensorExtended {
3755    fn default() -> Self {
3756        Self::DEFAULT
3757    }
3758}
3759#[cfg_attr(feature = "ts", derive(TS))]
3760#[cfg_attr(feature = "ts", ts(export))]
3761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3763#[cfg_attr(feature = "serde", serde(tag = "type"))]
3764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3765#[repr(u32)]
3766pub enum MavTunnelPayloadType {
3767    #[doc = "Encoding of payload unknown."]
3768    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3769    #[doc = "Registered for STorM32 gimbal controller."]
3770    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3771    #[doc = "Registered for STorM32 gimbal controller."]
3772    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3773    #[doc = "Registered for STorM32 gimbal controller."]
3774    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3775    #[doc = "Registered for STorM32 gimbal controller."]
3776    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3777    #[doc = "Registered for STorM32 gimbal controller."]
3778    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3779    #[doc = "Registered for STorM32 gimbal controller."]
3780    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3781    #[doc = "Registered for STorM32 gimbal controller."]
3782    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3783    #[doc = "Registered for STorM32 gimbal controller."]
3784    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3785    #[doc = "Registered for STorM32 gimbal controller."]
3786    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3787    #[doc = "Registered for STorM32 gimbal controller."]
3788    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3789    #[doc = "Registered for ModalAI remote OSD protocol."]
3790    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3791    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3792    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3793    #[doc = "Registered for ModalAI vendor use."]
3794    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3795}
3796impl MavTunnelPayloadType {
3797    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3798}
3799impl Default for MavTunnelPayloadType {
3800    fn default() -> Self {
3801        Self::DEFAULT
3802    }
3803}
3804#[cfg_attr(feature = "ts", derive(TS))]
3805#[cfg_attr(feature = "ts", ts(export))]
3806#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3808#[cfg_attr(feature = "serde", serde(tag = "type"))]
3809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3810#[repr(u32)]
3811#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3812pub enum MavType {
3813    #[doc = "Generic micro air vehicle"]
3814    MAV_TYPE_GENERIC = 0,
3815    #[doc = "Fixed wing aircraft."]
3816    MAV_TYPE_FIXED_WING = 1,
3817    #[doc = "Quadrotor"]
3818    MAV_TYPE_QUADROTOR = 2,
3819    #[doc = "Coaxial helicopter"]
3820    MAV_TYPE_COAXIAL = 3,
3821    #[doc = "Normal helicopter with tail rotor."]
3822    MAV_TYPE_HELICOPTER = 4,
3823    #[doc = "Ground installation"]
3824    MAV_TYPE_ANTENNA_TRACKER = 5,
3825    #[doc = "Operator control unit / ground control station"]
3826    MAV_TYPE_GCS = 6,
3827    #[doc = "Airship, controlled"]
3828    MAV_TYPE_AIRSHIP = 7,
3829    #[doc = "Free balloon, uncontrolled"]
3830    MAV_TYPE_FREE_BALLOON = 8,
3831    #[doc = "Rocket"]
3832    MAV_TYPE_ROCKET = 9,
3833    #[doc = "Ground rover"]
3834    MAV_TYPE_GROUND_ROVER = 10,
3835    #[doc = "Surface vessel, boat, ship"]
3836    MAV_TYPE_SURFACE_BOAT = 11,
3837    #[doc = "Submarine"]
3838    MAV_TYPE_SUBMARINE = 12,
3839    #[doc = "Hexarotor"]
3840    MAV_TYPE_HEXAROTOR = 13,
3841    #[doc = "Octorotor"]
3842    MAV_TYPE_OCTOROTOR = 14,
3843    #[doc = "Tricopter"]
3844    MAV_TYPE_TRICOPTER = 15,
3845    #[doc = "Flapping wing"]
3846    MAV_TYPE_FLAPPING_WING = 16,
3847    #[doc = "Kite"]
3848    MAV_TYPE_KITE = 17,
3849    #[doc = "Onboard companion controller"]
3850    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3851    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3852    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3853    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3854    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3855    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3856    MAV_TYPE_VTOL_TILTROTOR = 21,
3857    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3858    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3859    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3860    MAV_TYPE_VTOL_TAILSITTER = 23,
3861    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3862    MAV_TYPE_VTOL_TILTWING = 24,
3863    #[doc = "VTOL reserved 5"]
3864    MAV_TYPE_VTOL_RESERVED5 = 25,
3865    #[doc = "Gimbal"]
3866    MAV_TYPE_GIMBAL = 26,
3867    #[doc = "ADSB system"]
3868    MAV_TYPE_ADSB = 27,
3869    #[doc = "Steerable, nonrigid airfoil"]
3870    MAV_TYPE_PARAFOIL = 28,
3871    #[doc = "Dodecarotor"]
3872    MAV_TYPE_DODECAROTOR = 29,
3873    #[doc = "Camera"]
3874    MAV_TYPE_CAMERA = 30,
3875    #[doc = "Charging station"]
3876    MAV_TYPE_CHARGING_STATION = 31,
3877    #[doc = "FLARM collision avoidance system"]
3878    MAV_TYPE_FLARM = 32,
3879    #[doc = "Servo"]
3880    MAV_TYPE_SERVO = 33,
3881    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3882    MAV_TYPE_ODID = 34,
3883    #[doc = "Decarotor"]
3884    MAV_TYPE_DECAROTOR = 35,
3885    #[doc = "Battery"]
3886    MAV_TYPE_BATTERY = 36,
3887    #[doc = "Parachute"]
3888    MAV_TYPE_PARACHUTE = 37,
3889    #[doc = "Log"]
3890    MAV_TYPE_LOG = 38,
3891    #[doc = "OSD"]
3892    MAV_TYPE_OSD = 39,
3893    #[doc = "IMU"]
3894    MAV_TYPE_IMU = 40,
3895    #[doc = "GPS"]
3896    MAV_TYPE_GPS = 41,
3897    #[doc = "Winch"]
3898    MAV_TYPE_WINCH = 42,
3899    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3900    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3901    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3902    MAV_TYPE_ILLUMINATOR = 44,
3903    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3904    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3905}
3906impl MavType {
3907    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3908}
3909impl Default for MavType {
3910    fn default() -> Self {
3911        Self::DEFAULT
3912    }
3913}
3914#[cfg_attr(feature = "ts", derive(TS))]
3915#[cfg_attr(feature = "ts", ts(export))]
3916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3918#[cfg_attr(feature = "serde", serde(tag = "type"))]
3919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3920#[repr(u32)]
3921#[doc = "Enumeration of VTOL states"]
3922pub enum MavVtolState {
3923    #[doc = "MAV is not configured as VTOL"]
3924    MAV_VTOL_STATE_UNDEFINED = 0,
3925    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3926    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3927    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3928    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3929    #[doc = "VTOL is in multicopter state"]
3930    MAV_VTOL_STATE_MC = 3,
3931    #[doc = "VTOL is in fixed-wing state"]
3932    MAV_VTOL_STATE_FW = 4,
3933}
3934impl MavVtolState {
3935    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3936}
3937impl Default for MavVtolState {
3938    fn default() -> Self {
3939        Self::DEFAULT
3940    }
3941}
3942bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3943impl MavWinchStatusFlag {
3944    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3945}
3946impl Default for MavWinchStatusFlag {
3947    fn default() -> Self {
3948        Self::DEFAULT
3949    }
3950}
3951#[cfg_attr(feature = "ts", derive(TS))]
3952#[cfg_attr(feature = "ts", ts(export))]
3953#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3955#[cfg_attr(feature = "serde", serde(tag = "type"))]
3956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3957#[repr(u32)]
3958pub enum MavlinkDataStreamType {
3959    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3960    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3961    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3962    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3963    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3964    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3965}
3966impl MavlinkDataStreamType {
3967    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3968}
3969impl Default for MavlinkDataStreamType {
3970    fn default() -> Self {
3971        Self::DEFAULT
3972    }
3973}
3974#[cfg_attr(feature = "ts", derive(TS))]
3975#[cfg_attr(feature = "ts", ts(export))]
3976#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3978#[cfg_attr(feature = "serde", serde(tag = "type"))]
3979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3980#[repr(u32)]
3981#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3982pub enum MissionState {
3983    #[doc = "The mission status reporting is not supported."]
3984    MISSION_STATE_UNKNOWN = 0,
3985    #[doc = "No mission on the vehicle."]
3986    MISSION_STATE_NO_MISSION = 1,
3987    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3988    MISSION_STATE_NOT_STARTED = 2,
3989    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3990    MISSION_STATE_ACTIVE = 3,
3991    #[doc = "Mission is paused when in auto mode."]
3992    MISSION_STATE_PAUSED = 4,
3993    #[doc = "Mission has executed all mission items."]
3994    MISSION_STATE_COMPLETE = 5,
3995}
3996impl MissionState {
3997    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3998}
3999impl Default for MissionState {
4000    fn default() -> Self {
4001        Self::DEFAULT
4002    }
4003}
4004#[cfg_attr(feature = "ts", derive(TS))]
4005#[cfg_attr(feature = "ts", ts(export))]
4006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4008#[cfg_attr(feature = "serde", serde(tag = "type"))]
4009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4010#[repr(u32)]
4011#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4012pub enum MotorTestOrder {
4013    #[doc = "Default autopilot motor test method."]
4014    MOTOR_TEST_ORDER_DEFAULT = 0,
4015    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4016    MOTOR_TEST_ORDER_SEQUENCE = 1,
4017    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4018    MOTOR_TEST_ORDER_BOARD = 2,
4019}
4020impl MotorTestOrder {
4021    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4022}
4023impl Default for MotorTestOrder {
4024    fn default() -> Self {
4025        Self::DEFAULT
4026    }
4027}
4028#[cfg_attr(feature = "ts", derive(TS))]
4029#[cfg_attr(feature = "ts", ts(export))]
4030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4032#[cfg_attr(feature = "serde", serde(tag = "type"))]
4033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4034#[repr(u32)]
4035#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
4036pub enum MotorTestThrottleType {
4037    #[doc = "Throttle as a percentage (0 ~ 100)"]
4038    MOTOR_TEST_THROTTLE_PERCENT = 0,
4039    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
4040    MOTOR_TEST_THROTTLE_PWM = 1,
4041    #[doc = "Throttle pass-through from pilot's transmitter."]
4042    MOTOR_TEST_THROTTLE_PILOT = 2,
4043    #[doc = "Per-motor compass calibration test."]
4044    MOTOR_TEST_COMPASS_CAL = 3,
4045}
4046impl MotorTestThrottleType {
4047    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
4048}
4049impl Default for MotorTestThrottleType {
4050    fn default() -> Self {
4051        Self::DEFAULT
4052    }
4053}
4054#[cfg_attr(feature = "ts", derive(TS))]
4055#[cfg_attr(feature = "ts", ts(export))]
4056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4058#[cfg_attr(feature = "serde", serde(tag = "type"))]
4059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4060#[repr(u32)]
4061pub enum NavVtolLandOptions {
4062    #[doc = "Default autopilot landing behaviour."]
4063    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4064    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4065    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4066    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4067    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4068}
4069impl NavVtolLandOptions {
4070    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4071}
4072impl Default for NavVtolLandOptions {
4073    fn default() -> Self {
4074        Self::DEFAULT
4075    }
4076}
4077#[cfg_attr(feature = "ts", derive(TS))]
4078#[cfg_attr(feature = "ts", ts(export))]
4079#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4081#[cfg_attr(feature = "serde", serde(tag = "type"))]
4082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4083#[repr(u32)]
4084#[doc = "Yaw behaviour during orbit flight."]
4085pub enum OrbitYawBehaviour {
4086    #[doc = "Vehicle front points to the center (default)."]
4087    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4088    #[doc = "Vehicle front holds heading when message received."]
4089    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4090    #[doc = "Yaw uncontrolled."]
4091    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4092    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4093    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4094    #[doc = "Yaw controlled by RC input."]
4095    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4096    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4097    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4098}
4099impl OrbitYawBehaviour {
4100    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4101}
4102impl Default for OrbitYawBehaviour {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4115pub enum ParachuteAction {
4116    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4117    PARACHUTE_DISABLE = 0,
4118    #[doc = "Enable auto-release of parachute."]
4119    PARACHUTE_ENABLE = 1,
4120    #[doc = "Release parachute and kill motors."]
4121    PARACHUTE_RELEASE = 2,
4122}
4123impl ParachuteAction {
4124    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4125}
4126impl Default for ParachuteAction {
4127    fn default() -> Self {
4128        Self::DEFAULT
4129    }
4130}
4131#[cfg_attr(feature = "ts", derive(TS))]
4132#[cfg_attr(feature = "ts", ts(export))]
4133#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4135#[cfg_attr(feature = "serde", serde(tag = "type"))]
4136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4137#[repr(u32)]
4138#[doc = "Result from PARAM_EXT_SET message."]
4139pub enum ParamAck {
4140    #[doc = "Parameter value ACCEPTED and SET"]
4141    PARAM_ACK_ACCEPTED = 0,
4142    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4143    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4144    #[doc = "Parameter failed to set"]
4145    PARAM_ACK_FAILED = 2,
4146    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4147    PARAM_ACK_IN_PROGRESS = 3,
4148}
4149impl ParamAck {
4150    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4151}
4152impl Default for ParamAck {
4153    fn default() -> Self {
4154        Self::DEFAULT
4155    }
4156}
4157bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4158impl PositionTargetTypemask {
4159    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4160}
4161impl Default for PositionTargetTypemask {
4162    fn default() -> Self {
4163        Self::DEFAULT
4164    }
4165}
4166#[cfg_attr(feature = "ts", derive(TS))]
4167#[cfg_attr(feature = "ts", ts(export))]
4168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4170#[cfg_attr(feature = "serde", serde(tag = "type"))]
4171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4172#[repr(u32)]
4173#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4174pub enum PrecisionLandMode {
4175    #[doc = "Normal (non-precision) landing."]
4176    PRECISION_LAND_MODE_DISABLED = 0,
4177    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4178    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4179    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4180    PRECISION_LAND_MODE_REQUIRED = 2,
4181}
4182impl PrecisionLandMode {
4183    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4184}
4185impl Default for PrecisionLandMode {
4186    fn default() -> Self {
4187        Self::DEFAULT
4188    }
4189}
4190#[cfg_attr(feature = "ts", derive(TS))]
4191#[cfg_attr(feature = "ts", ts(export))]
4192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4194#[cfg_attr(feature = "serde", serde(tag = "type"))]
4195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4196#[repr(u32)]
4197#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4198pub enum PreflightStorageMissionAction {
4199    #[doc = "Read current mission data from persistent storage"]
4200    MISSION_READ_PERSISTENT = 0,
4201    #[doc = "Write current mission data to persistent storage"]
4202    MISSION_WRITE_PERSISTENT = 1,
4203    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4204    MISSION_RESET_DEFAULT = 2,
4205}
4206impl PreflightStorageMissionAction {
4207    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4208}
4209impl Default for PreflightStorageMissionAction {
4210    fn default() -> Self {
4211        Self::DEFAULT
4212    }
4213}
4214#[cfg_attr(feature = "ts", derive(TS))]
4215#[cfg_attr(feature = "ts", ts(export))]
4216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4218#[cfg_attr(feature = "serde", serde(tag = "type"))]
4219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4220#[repr(u32)]
4221#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4222pub enum PreflightStorageParameterAction {
4223    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4224    PARAM_READ_PERSISTENT = 0,
4225    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4226    PARAM_WRITE_PERSISTENT = 1,
4227    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4228    PARAM_RESET_CONFIG_DEFAULT = 2,
4229    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4230    PARAM_RESET_SENSOR_DEFAULT = 3,
4231    #[doc = "Reset all parameters, including operation counters, to default values"]
4232    PARAM_RESET_ALL_DEFAULT = 4,
4233}
4234impl PreflightStorageParameterAction {
4235    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4236}
4237impl Default for PreflightStorageParameterAction {
4238    fn default() -> Self {
4239        Self::DEFAULT
4240    }
4241}
4242bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "RADIO_RC_CHANNELS flags (bitmask)."] pub struct RadioRcChannelsFlags : u16 { # [doc = "Failsafe is active. The content of the RC channels data in the RADIO_RC_CHANNELS message is implementation dependent."] const RADIO_RC_CHANNELS_FLAGS_FAILSAFE = 1 ; # [doc = "Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received."] const RADIO_RC_CHANNELS_FLAGS_OUTDATED = 2 ; } }
4243impl RadioRcChannelsFlags {
4244    pub const DEFAULT: Self = Self::RADIO_RC_CHANNELS_FLAGS_FAILSAFE;
4245}
4246impl Default for RadioRcChannelsFlags {
4247    fn default() -> Self {
4248        Self::DEFAULT
4249    }
4250}
4251#[cfg_attr(feature = "ts", derive(TS))]
4252#[cfg_attr(feature = "ts", ts(export))]
4253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4255#[cfg_attr(feature = "serde", serde(tag = "type"))]
4256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4257#[repr(u32)]
4258#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4259pub enum RcSubType {
4260    #[doc = "Spektrum DSM2"]
4261    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4262    #[doc = "Spektrum DSMX"]
4263    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4264    #[doc = "Spektrum DSMX8"]
4265    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4266}
4267impl RcSubType {
4268    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4269}
4270impl Default for RcSubType {
4271    fn default() -> Self {
4272        Self::DEFAULT
4273    }
4274}
4275#[cfg_attr(feature = "ts", derive(TS))]
4276#[cfg_attr(feature = "ts", ts(export))]
4277#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4279#[cfg_attr(feature = "serde", serde(tag = "type"))]
4280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4281#[repr(u32)]
4282#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4283pub enum RcType {
4284    #[doc = "Spektrum"]
4285    RC_TYPE_SPEKTRUM = 0,
4286    #[doc = "CRSF"]
4287    RC_TYPE_CRSF = 1,
4288}
4289impl RcType {
4290    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4291}
4292impl Default for RcType {
4293    fn default() -> Self {
4294        Self::DEFAULT
4295    }
4296}
4297#[cfg_attr(feature = "ts", derive(TS))]
4298#[cfg_attr(feature = "ts", ts(export))]
4299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4301#[cfg_attr(feature = "serde", serde(tag = "type"))]
4302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4303#[repr(u32)]
4304#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4305pub enum RebootShutdownConditions {
4306    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4307    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4308    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4309    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4310}
4311impl RebootShutdownConditions {
4312    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4313}
4314impl Default for RebootShutdownConditions {
4315    fn default() -> Self {
4316        Self::DEFAULT
4317    }
4318}
4319#[cfg_attr(feature = "ts", derive(TS))]
4320#[cfg_attr(feature = "ts", ts(export))]
4321#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4323#[cfg_attr(feature = "serde", serde(tag = "type"))]
4324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4325#[repr(u32)]
4326#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4327pub enum RtkBaselineCoordinateSystem {
4328    #[doc = "Earth-centered, Earth-fixed"]
4329    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4330    #[doc = "RTK basestation centered, north, east, down"]
4331    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4332}
4333impl RtkBaselineCoordinateSystem {
4334    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4335}
4336impl Default for RtkBaselineCoordinateSystem {
4337    fn default() -> Self {
4338        Self::DEFAULT
4339    }
4340}
4341#[cfg_attr(feature = "ts", derive(TS))]
4342#[cfg_attr(feature = "ts", ts(export))]
4343#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4345#[cfg_attr(feature = "serde", serde(tag = "type"))]
4346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4347#[repr(u32)]
4348#[doc = "Possible safety switch states."]
4349pub enum SafetySwitchState {
4350    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4351    SAFETY_SWITCH_STATE_SAFE = 0,
4352    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4353    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4354}
4355impl SafetySwitchState {
4356    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4357}
4358impl Default for SafetySwitchState {
4359    fn default() -> Self {
4360        Self::DEFAULT
4361    }
4362}
4363#[cfg_attr(feature = "ts", derive(TS))]
4364#[cfg_attr(feature = "ts", ts(export))]
4365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4367#[cfg_attr(feature = "serde", serde(tag = "type"))]
4368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4369#[repr(u32)]
4370#[doc = "SERIAL_CONTROL device types"]
4371pub enum SerialControlDev {
4372    #[doc = "First telemetry port"]
4373    SERIAL_CONTROL_DEV_TELEM1 = 0,
4374    #[doc = "Second telemetry port"]
4375    SERIAL_CONTROL_DEV_TELEM2 = 1,
4376    #[doc = "First GPS port"]
4377    SERIAL_CONTROL_DEV_GPS1 = 2,
4378    #[doc = "Second GPS port"]
4379    SERIAL_CONTROL_DEV_GPS2 = 3,
4380    #[doc = "system shell"]
4381    SERIAL_CONTROL_DEV_SHELL = 10,
4382    #[doc = "SERIAL0"]
4383    SERIAL_CONTROL_SERIAL0 = 100,
4384    #[doc = "SERIAL1"]
4385    SERIAL_CONTROL_SERIAL1 = 101,
4386    #[doc = "SERIAL2"]
4387    SERIAL_CONTROL_SERIAL2 = 102,
4388    #[doc = "SERIAL3"]
4389    SERIAL_CONTROL_SERIAL3 = 103,
4390    #[doc = "SERIAL4"]
4391    SERIAL_CONTROL_SERIAL4 = 104,
4392    #[doc = "SERIAL5"]
4393    SERIAL_CONTROL_SERIAL5 = 105,
4394    #[doc = "SERIAL6"]
4395    SERIAL_CONTROL_SERIAL6 = 106,
4396    #[doc = "SERIAL7"]
4397    SERIAL_CONTROL_SERIAL7 = 107,
4398    #[doc = "SERIAL8"]
4399    SERIAL_CONTROL_SERIAL8 = 108,
4400    #[doc = "SERIAL9"]
4401    SERIAL_CONTROL_SERIAL9 = 109,
4402}
4403impl SerialControlDev {
4404    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4405}
4406impl Default for SerialControlDev {
4407    fn default() -> Self {
4408        Self::DEFAULT
4409    }
4410}
4411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4412impl SerialControlFlag {
4413    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4414}
4415impl Default for SerialControlFlag {
4416    fn default() -> Self {
4417        Self::DEFAULT
4418    }
4419}
4420#[cfg_attr(feature = "ts", derive(TS))]
4421#[cfg_attr(feature = "ts", ts(export))]
4422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4424#[cfg_attr(feature = "serde", serde(tag = "type"))]
4425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4426#[repr(u32)]
4427#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4428pub enum SetFocusType {
4429    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4430    FOCUS_TYPE_STEP = 0,
4431    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4432    FOCUS_TYPE_CONTINUOUS = 1,
4433    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4434    FOCUS_TYPE_RANGE = 2,
4435    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4436    FOCUS_TYPE_METERS = 3,
4437    #[doc = "Focus automatically."]
4438    FOCUS_TYPE_AUTO = 4,
4439    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4440    FOCUS_TYPE_AUTO_SINGLE = 5,
4441    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4442    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4443}
4444impl SetFocusType {
4445    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4446}
4447impl Default for SetFocusType {
4448    fn default() -> Self {
4449        Self::DEFAULT
4450    }
4451}
4452#[cfg_attr(feature = "ts", derive(TS))]
4453#[cfg_attr(feature = "ts", ts(export))]
4454#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4456#[cfg_attr(feature = "serde", serde(tag = "type"))]
4457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4458#[repr(u32)]
4459#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4460pub enum SpeedType {
4461    #[doc = "Airspeed"]
4462    SPEED_TYPE_AIRSPEED = 0,
4463    #[doc = "Groundspeed"]
4464    SPEED_TYPE_GROUNDSPEED = 1,
4465    #[doc = "Climb speed"]
4466    SPEED_TYPE_CLIMB_SPEED = 2,
4467    #[doc = "Descent speed"]
4468    SPEED_TYPE_DESCENT_SPEED = 3,
4469}
4470impl SpeedType {
4471    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4472}
4473impl Default for SpeedType {
4474    fn default() -> Self {
4475        Self::DEFAULT
4476    }
4477}
4478#[cfg_attr(feature = "ts", derive(TS))]
4479#[cfg_attr(feature = "ts", ts(export))]
4480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4482#[cfg_attr(feature = "serde", serde(tag = "type"))]
4483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4484#[repr(u32)]
4485#[doc = "Flags to indicate the status of camera storage."]
4486pub enum StorageStatus {
4487    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4488    STORAGE_STATUS_EMPTY = 0,
4489    #[doc = "Storage present but unformatted."]
4490    STORAGE_STATUS_UNFORMATTED = 1,
4491    #[doc = "Storage present and ready."]
4492    STORAGE_STATUS_READY = 2,
4493    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4494    STORAGE_STATUS_NOT_SUPPORTED = 3,
4495}
4496impl StorageStatus {
4497    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4498}
4499impl Default for StorageStatus {
4500    fn default() -> Self {
4501        Self::DEFAULT
4502    }
4503}
4504#[cfg_attr(feature = "ts", derive(TS))]
4505#[cfg_attr(feature = "ts", ts(export))]
4506#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4508#[cfg_attr(feature = "serde", serde(tag = "type"))]
4509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4510#[repr(u32)]
4511#[doc = "Flags to indicate the type of storage."]
4512pub enum StorageType {
4513    #[doc = "Storage type is not known."]
4514    STORAGE_TYPE_UNKNOWN = 0,
4515    #[doc = "Storage type is USB device."]
4516    STORAGE_TYPE_USB_STICK = 1,
4517    #[doc = "Storage type is SD card."]
4518    STORAGE_TYPE_SD = 2,
4519    #[doc = "Storage type is microSD card."]
4520    STORAGE_TYPE_MICROSD = 3,
4521    #[doc = "Storage type is CFast."]
4522    STORAGE_TYPE_CF = 4,
4523    #[doc = "Storage type is CFexpress."]
4524    STORAGE_TYPE_CFE = 5,
4525    #[doc = "Storage type is XQD."]
4526    STORAGE_TYPE_XQD = 6,
4527    #[doc = "Storage type is HD mass storage type."]
4528    STORAGE_TYPE_HD = 7,
4529    #[doc = "Storage type is other, not listed type."]
4530    STORAGE_TYPE_OTHER = 254,
4531}
4532impl StorageType {
4533    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4534}
4535impl Default for StorageType {
4536    fn default() -> Self {
4537        Self::DEFAULT
4538    }
4539}
4540bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4541impl StorageUsageFlag {
4542    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4543}
4544impl Default for StorageUsageFlag {
4545    fn default() -> Self {
4546        Self::DEFAULT
4547    }
4548}
4549bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE."] pub struct TargetAbsoluteSensorCapabilityFlags : u8 { const TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION = 1 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_VELOCITY = 2 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ACCELERATION = 4 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ATTITUDE = 8 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_RATES = 16 ; } }
4550impl TargetAbsoluteSensorCapabilityFlags {
4551    pub const DEFAULT: Self = Self::TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION;
4552}
4553impl Default for TargetAbsoluteSensorCapabilityFlags {
4554    fn default() -> Self {
4555        Self::DEFAULT
4556    }
4557}
4558#[cfg_attr(feature = "ts", derive(TS))]
4559#[cfg_attr(feature = "ts", ts(export))]
4560#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4562#[cfg_attr(feature = "serde", serde(tag = "type"))]
4563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4564#[repr(u32)]
4565#[doc = "The frame of a target observation from an onboard sensor."]
4566pub enum TargetObsFrame {
4567    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4568    TARGET_OBS_FRAME_LOCAL_NED = 0,
4569    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4570    TARGET_OBS_FRAME_BODY_FRD = 1,
4571    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle."]
4572    TARGET_OBS_FRAME_LOCAL_OFFSET_NED = 2,
4573    #[doc = "Other sensor frame for target observations neither in local NED nor in body FRD."]
4574    TARGET_OBS_FRAME_OTHER = 3,
4575}
4576impl TargetObsFrame {
4577    pub const DEFAULT: Self = Self::TARGET_OBS_FRAME_LOCAL_NED;
4578}
4579impl Default for TargetObsFrame {
4580    fn default() -> Self {
4581        Self::DEFAULT
4582    }
4583}
4584#[cfg_attr(feature = "ts", derive(TS))]
4585#[cfg_attr(feature = "ts", ts(export))]
4586#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4588#[cfg_attr(feature = "serde", serde(tag = "type"))]
4589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4590#[repr(u32)]
4591#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4592pub enum TuneFormat {
4593    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4594    TUNE_FORMAT_QBASIC1_1 = 1,
4595    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4596    TUNE_FORMAT_MML_MODERN = 2,
4597}
4598impl TuneFormat {
4599    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4600}
4601impl Default for TuneFormat {
4602    fn default() -> Self {
4603        Self::DEFAULT
4604    }
4605}
4606#[cfg_attr(feature = "ts", derive(TS))]
4607#[cfg_attr(feature = "ts", ts(export))]
4608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4610#[cfg_attr(feature = "serde", serde(tag = "type"))]
4611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4612#[repr(u32)]
4613#[doc = "Generalized UAVCAN node health"]
4614pub enum UavcanNodeHealth {
4615    #[doc = "The node is functioning properly."]
4616    UAVCAN_NODE_HEALTH_OK = 0,
4617    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4618    UAVCAN_NODE_HEALTH_WARNING = 1,
4619    #[doc = "The node has encountered a major failure."]
4620    UAVCAN_NODE_HEALTH_ERROR = 2,
4621    #[doc = "The node has suffered a fatal malfunction."]
4622    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4623}
4624impl UavcanNodeHealth {
4625    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4626}
4627impl Default for UavcanNodeHealth {
4628    fn default() -> Self {
4629        Self::DEFAULT
4630    }
4631}
4632#[cfg_attr(feature = "ts", derive(TS))]
4633#[cfg_attr(feature = "ts", ts(export))]
4634#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4636#[cfg_attr(feature = "serde", serde(tag = "type"))]
4637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4638#[repr(u32)]
4639#[doc = "Generalized UAVCAN node mode"]
4640pub enum UavcanNodeMode {
4641    #[doc = "The node is performing its primary functions."]
4642    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4643    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4644    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4645    #[doc = "The node is under maintenance."]
4646    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4647    #[doc = "The node is in the process of updating its software."]
4648    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4649    #[doc = "The node is no longer available online."]
4650    UAVCAN_NODE_MODE_OFFLINE = 7,
4651}
4652impl UavcanNodeMode {
4653    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4654}
4655impl Default for UavcanNodeMode {
4656    fn default() -> Self {
4657        Self::DEFAULT
4658    }
4659}
4660bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4661impl UtmDataAvailFlags {
4662    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4663}
4664impl Default for UtmDataAvailFlags {
4665    fn default() -> Self {
4666        Self::DEFAULT
4667    }
4668}
4669#[cfg_attr(feature = "ts", derive(TS))]
4670#[cfg_attr(feature = "ts", ts(export))]
4671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4673#[cfg_attr(feature = "serde", serde(tag = "type"))]
4674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4675#[repr(u32)]
4676#[doc = "Airborne status of UAS."]
4677pub enum UtmFlightState {
4678    #[doc = "The flight state can't be determined."]
4679    UTM_FLIGHT_STATE_UNKNOWN = 1,
4680    #[doc = "UAS on ground."]
4681    UTM_FLIGHT_STATE_GROUND = 2,
4682    #[doc = "UAS airborne."]
4683    UTM_FLIGHT_STATE_AIRBORNE = 3,
4684    #[doc = "UAS is in an emergency flight state."]
4685    UTM_FLIGHT_STATE_EMERGENCY = 16,
4686    #[doc = "UAS has no active controls."]
4687    UTM_FLIGHT_STATE_NOCTRL = 32,
4688}
4689impl UtmFlightState {
4690    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4691}
4692impl Default for UtmFlightState {
4693    fn default() -> Self {
4694        Self::DEFAULT
4695    }
4696}
4697#[cfg_attr(feature = "ts", derive(TS))]
4698#[cfg_attr(feature = "ts", ts(export))]
4699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4701#[cfg_attr(feature = "serde", serde(tag = "type"))]
4702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4703#[repr(u32)]
4704#[doc = "Video stream encodings"]
4705pub enum VideoStreamEncoding {
4706    #[doc = "Stream encoding is unknown"]
4707    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4708    #[doc = "Stream encoding is H.264"]
4709    VIDEO_STREAM_ENCODING_H264 = 1,
4710    #[doc = "Stream encoding is H.265"]
4711    VIDEO_STREAM_ENCODING_H265 = 2,
4712}
4713impl VideoStreamEncoding {
4714    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4715}
4716impl Default for VideoStreamEncoding {
4717    fn default() -> Self {
4718        Self::DEFAULT
4719    }
4720}
4721bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4722impl VideoStreamStatusFlags {
4723    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4724}
4725impl Default for VideoStreamStatusFlags {
4726    fn default() -> Self {
4727        Self::DEFAULT
4728    }
4729}
4730#[cfg_attr(feature = "ts", derive(TS))]
4731#[cfg_attr(feature = "ts", ts(export))]
4732#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4734#[cfg_attr(feature = "serde", serde(tag = "type"))]
4735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4736#[repr(u32)]
4737#[doc = "Video stream types"]
4738pub enum VideoStreamType {
4739    #[doc = "Stream is RTSP"]
4740    VIDEO_STREAM_TYPE_RTSP = 0,
4741    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4742    VIDEO_STREAM_TYPE_RTPUDP = 1,
4743    #[doc = "Stream is MPEG on TCP"]
4744    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4745    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4746    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4747}
4748impl VideoStreamType {
4749    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4750}
4751impl Default for VideoStreamType {
4752    fn default() -> Self {
4753        Self::DEFAULT
4754    }
4755}
4756#[cfg_attr(feature = "ts", derive(TS))]
4757#[cfg_attr(feature = "ts", ts(export))]
4758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4760#[cfg_attr(feature = "serde", serde(tag = "type"))]
4761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4762#[repr(u32)]
4763#[doc = "Direction of VTOL transition"]
4764pub enum VtolTransitionHeading {
4765    #[doc = "Respect the heading configuration of the vehicle."]
4766    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4767    #[doc = "Use the heading pointing towards the next waypoint."]
4768    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4769    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4770    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4771    #[doc = "Use the specified heading in parameter 4."]
4772    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4773    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4774    VTOL_TRANSITION_HEADING_ANY = 4,
4775}
4776impl VtolTransitionHeading {
4777    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4778}
4779impl Default for VtolTransitionHeading {
4780    fn default() -> Self {
4781        Self::DEFAULT
4782    }
4783}
4784#[cfg_attr(feature = "ts", derive(TS))]
4785#[cfg_attr(feature = "ts", ts(export))]
4786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4788#[cfg_attr(feature = "serde", serde(tag = "type"))]
4789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4790#[repr(u32)]
4791#[doc = "WiFi Mode."]
4792pub enum WifiConfigApMode {
4793    #[doc = "WiFi mode is undefined."]
4794    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4795    #[doc = "WiFi configured as an access point."]
4796    WIFI_CONFIG_AP_MODE_AP = 1,
4797    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4798    WIFI_CONFIG_AP_MODE_STATION = 2,
4799    #[doc = "WiFi disabled."]
4800    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4801}
4802impl WifiConfigApMode {
4803    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4804}
4805impl Default for WifiConfigApMode {
4806    fn default() -> Self {
4807        Self::DEFAULT
4808    }
4809}
4810#[cfg_attr(feature = "ts", derive(TS))]
4811#[cfg_attr(feature = "ts", ts(export))]
4812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4814#[cfg_attr(feature = "serde", serde(tag = "type"))]
4815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4816#[repr(u32)]
4817#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4818pub enum WifiConfigApResponse {
4819    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4820    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4821    #[doc = "Changes accepted."]
4822    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4823    #[doc = "Changes rejected."]
4824    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4825    #[doc = "Invalid Mode."]
4826    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4827    #[doc = "Invalid SSID."]
4828    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4829    #[doc = "Invalid Password."]
4830    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4831}
4832impl WifiConfigApResponse {
4833    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4834}
4835impl Default for WifiConfigApResponse {
4836    fn default() -> Self {
4837        Self::DEFAULT
4838    }
4839}
4840#[cfg_attr(feature = "ts", derive(TS))]
4841#[cfg_attr(feature = "ts", ts(export))]
4842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4844#[cfg_attr(feature = "serde", serde(tag = "type"))]
4845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4846#[repr(u32)]
4847#[doc = "Winch actions."]
4848pub enum WinchActions {
4849    #[doc = "Allow motor to freewheel."]
4850    WINCH_RELAXED = 0,
4851    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4852    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4853    #[doc = "Wind or unwind line at specified rate."]
4854    WINCH_RATE_CONTROL = 2,
4855    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4856    WINCH_LOCK = 3,
4857    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4858    WINCH_DELIVER = 4,
4859    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4860    WINCH_HOLD = 5,
4861    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4862    WINCH_RETRACT = 6,
4863    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4864    WINCH_LOAD_LINE = 7,
4865    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4866    WINCH_ABANDON_LINE = 8,
4867    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4868    WINCH_LOAD_PAYLOAD = 9,
4869}
4870impl WinchActions {
4871    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4872}
4873impl Default for WinchActions {
4874    fn default() -> Self {
4875        Self::DEFAULT
4876    }
4877}
4878#[doc = "Set the vehicle attitude and body angular rates."]
4879#[doc = ""]
4880#[doc = "ID: 140"]
4881#[derive(Debug, Clone, PartialEq)]
4882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4884#[cfg_attr(feature = "ts", derive(TS))]
4885#[cfg_attr(feature = "ts", ts(export))]
4886pub struct ACTUATOR_CONTROL_TARGET_DATA {
4887    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4888    pub time_usec: u64,
4889    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4891    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4892    pub controls: [f32; 8],
4893    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4894    pub group_mlx: u8,
4895}
4896impl ACTUATOR_CONTROL_TARGET_DATA {
4897    pub const ENCODED_LEN: usize = 41usize;
4898    pub const DEFAULT: Self = Self {
4899        time_usec: 0_u64,
4900        controls: [0.0_f32; 8usize],
4901        group_mlx: 0_u8,
4902    };
4903    #[cfg(feature = "arbitrary")]
4904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4905        use arbitrary::{Arbitrary, Unstructured};
4906        let mut buf = [0u8; 1024];
4907        rng.fill_bytes(&mut buf);
4908        let mut unstructured = Unstructured::new(&buf);
4909        Self::arbitrary(&mut unstructured).unwrap_or_default()
4910    }
4911}
4912impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4913    fn default() -> Self {
4914        Self::DEFAULT.clone()
4915    }
4916}
4917impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4918    type Message = MavMessage;
4919    const ID: u32 = 140u32;
4920    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4921    const EXTRA_CRC: u8 = 181u8;
4922    const ENCODED_LEN: usize = 41usize;
4923    fn deser(
4924        _version: MavlinkVersion,
4925        __input: &[u8],
4926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4927        let avail_len = __input.len();
4928        let mut payload_buf = [0; Self::ENCODED_LEN];
4929        let mut buf = if avail_len < Self::ENCODED_LEN {
4930            payload_buf[0..avail_len].copy_from_slice(__input);
4931            Bytes::new(&payload_buf)
4932        } else {
4933            Bytes::new(__input)
4934        };
4935        let mut __struct = Self::default();
4936        __struct.time_usec = buf.get_u64_le();
4937        for v in &mut __struct.controls {
4938            let val = buf.get_f32_le();
4939            *v = val;
4940        }
4941        __struct.group_mlx = buf.get_u8();
4942        Ok(__struct)
4943    }
4944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4945        let mut __tmp = BytesMut::new(bytes);
4946        #[allow(clippy::absurd_extreme_comparisons)]
4947        #[allow(unused_comparisons)]
4948        if __tmp.remaining() < Self::ENCODED_LEN {
4949            panic!(
4950                "buffer is too small (need {} bytes, but got {})",
4951                Self::ENCODED_LEN,
4952                __tmp.remaining(),
4953            )
4954        }
4955        __tmp.put_u64_le(self.time_usec);
4956        for val in &self.controls {
4957            __tmp.put_f32_le(*val);
4958        }
4959        __tmp.put_u8(self.group_mlx);
4960        if matches!(version, MavlinkVersion::V2) {
4961            let len = __tmp.len();
4962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4963        } else {
4964            __tmp.len()
4965        }
4966    }
4967}
4968#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4969#[doc = ""]
4970#[doc = "ID: 375"]
4971#[derive(Debug, Clone, PartialEq)]
4972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4974#[cfg_attr(feature = "ts", derive(TS))]
4975#[cfg_attr(feature = "ts", ts(export))]
4976pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4977    #[doc = "Timestamp (since system boot)."]
4978    pub time_usec: u64,
4979    #[doc = "Active outputs"]
4980    pub active: u32,
4981    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4983    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4984    pub actuator: [f32; 32],
4985}
4986impl ACTUATOR_OUTPUT_STATUS_DATA {
4987    pub const ENCODED_LEN: usize = 140usize;
4988    pub const DEFAULT: Self = Self {
4989        time_usec: 0_u64,
4990        active: 0_u32,
4991        actuator: [0.0_f32; 32usize],
4992    };
4993    #[cfg(feature = "arbitrary")]
4994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4995        use arbitrary::{Arbitrary, Unstructured};
4996        let mut buf = [0u8; 1024];
4997        rng.fill_bytes(&mut buf);
4998        let mut unstructured = Unstructured::new(&buf);
4999        Self::arbitrary(&mut unstructured).unwrap_or_default()
5000    }
5001}
5002impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5003    fn default() -> Self {
5004        Self::DEFAULT.clone()
5005    }
5006}
5007impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5008    type Message = MavMessage;
5009    const ID: u32 = 375u32;
5010    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5011    const EXTRA_CRC: u8 = 251u8;
5012    const ENCODED_LEN: usize = 140usize;
5013    fn deser(
5014        _version: MavlinkVersion,
5015        __input: &[u8],
5016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5017        let avail_len = __input.len();
5018        let mut payload_buf = [0; Self::ENCODED_LEN];
5019        let mut buf = if avail_len < Self::ENCODED_LEN {
5020            payload_buf[0..avail_len].copy_from_slice(__input);
5021            Bytes::new(&payload_buf)
5022        } else {
5023            Bytes::new(__input)
5024        };
5025        let mut __struct = Self::default();
5026        __struct.time_usec = buf.get_u64_le();
5027        __struct.active = buf.get_u32_le();
5028        for v in &mut __struct.actuator {
5029            let val = buf.get_f32_le();
5030            *v = val;
5031        }
5032        Ok(__struct)
5033    }
5034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5035        let mut __tmp = BytesMut::new(bytes);
5036        #[allow(clippy::absurd_extreme_comparisons)]
5037        #[allow(unused_comparisons)]
5038        if __tmp.remaining() < Self::ENCODED_LEN {
5039            panic!(
5040                "buffer is too small (need {} bytes, but got {})",
5041                Self::ENCODED_LEN,
5042                __tmp.remaining(),
5043            )
5044        }
5045        __tmp.put_u64_le(self.time_usec);
5046        __tmp.put_u32_le(self.active);
5047        for val in &self.actuator {
5048            __tmp.put_f32_le(*val);
5049        }
5050        if matches!(version, MavlinkVersion::V2) {
5051            let len = __tmp.len();
5052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5053        } else {
5054            __tmp.len()
5055        }
5056    }
5057}
5058#[doc = "The location and information of an ADSB vehicle."]
5059#[doc = ""]
5060#[doc = "ID: 246"]
5061#[derive(Debug, Clone, PartialEq)]
5062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5064#[cfg_attr(feature = "ts", derive(TS))]
5065#[cfg_attr(feature = "ts", ts(export))]
5066pub struct ADSB_VEHICLE_DATA {
5067    #[doc = "ICAO address"]
5068    pub ICAO_address: u32,
5069    #[doc = "Latitude"]
5070    pub lat: i32,
5071    #[doc = "Longitude"]
5072    pub lon: i32,
5073    #[doc = "Altitude(ASL)"]
5074    pub altitude: i32,
5075    #[doc = "Course over ground"]
5076    pub heading: u16,
5077    #[doc = "The horizontal velocity"]
5078    pub hor_velocity: u16,
5079    #[doc = "The vertical velocity. Positive is up"]
5080    pub ver_velocity: i16,
5081    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5082    pub flags: AdsbFlags,
5083    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5084    pub squawk: u16,
5085    #[doc = "ADSB altitude type."]
5086    pub altitude_type: AdsbAltitudeType,
5087    #[doc = "The callsign, 8+null"]
5088    #[cfg_attr(feature = "ts", ts(type = "string"))]
5089    pub callsign: CharArray<9>,
5090    #[doc = "ADSB emitter type."]
5091    pub emitter_type: AdsbEmitterType,
5092    #[doc = "Time since last communication in seconds"]
5093    pub tslc: u8,
5094}
5095impl ADSB_VEHICLE_DATA {
5096    pub const ENCODED_LEN: usize = 38usize;
5097    pub const DEFAULT: Self = Self {
5098        ICAO_address: 0_u32,
5099        lat: 0_i32,
5100        lon: 0_i32,
5101        altitude: 0_i32,
5102        heading: 0_u16,
5103        hor_velocity: 0_u16,
5104        ver_velocity: 0_i16,
5105        flags: AdsbFlags::DEFAULT,
5106        squawk: 0_u16,
5107        altitude_type: AdsbAltitudeType::DEFAULT,
5108        callsign: CharArray::new([0_u8; 9usize]),
5109        emitter_type: AdsbEmitterType::DEFAULT,
5110        tslc: 0_u8,
5111    };
5112    #[cfg(feature = "arbitrary")]
5113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5114        use arbitrary::{Arbitrary, Unstructured};
5115        let mut buf = [0u8; 1024];
5116        rng.fill_bytes(&mut buf);
5117        let mut unstructured = Unstructured::new(&buf);
5118        Self::arbitrary(&mut unstructured).unwrap_or_default()
5119    }
5120}
5121impl Default for ADSB_VEHICLE_DATA {
5122    fn default() -> Self {
5123        Self::DEFAULT.clone()
5124    }
5125}
5126impl MessageData for ADSB_VEHICLE_DATA {
5127    type Message = MavMessage;
5128    const ID: u32 = 246u32;
5129    const NAME: &'static str = "ADSB_VEHICLE";
5130    const EXTRA_CRC: u8 = 184u8;
5131    const ENCODED_LEN: usize = 38usize;
5132    fn deser(
5133        _version: MavlinkVersion,
5134        __input: &[u8],
5135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5136        let avail_len = __input.len();
5137        let mut payload_buf = [0; Self::ENCODED_LEN];
5138        let mut buf = if avail_len < Self::ENCODED_LEN {
5139            payload_buf[0..avail_len].copy_from_slice(__input);
5140            Bytes::new(&payload_buf)
5141        } else {
5142            Bytes::new(__input)
5143        };
5144        let mut __struct = Self::default();
5145        __struct.ICAO_address = buf.get_u32_le();
5146        __struct.lat = buf.get_i32_le();
5147        __struct.lon = buf.get_i32_le();
5148        __struct.altitude = buf.get_i32_le();
5149        __struct.heading = buf.get_u16_le();
5150        __struct.hor_velocity = buf.get_u16_le();
5151        __struct.ver_velocity = buf.get_i16_le();
5152        let tmp = buf.get_u16_le();
5153        __struct.flags =
5154            AdsbFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5155                flag_type: "AdsbFlags",
5156                value: tmp as u64,
5157            })?;
5158        __struct.squawk = buf.get_u16_le();
5159        let tmp = buf.get_u8();
5160        __struct.altitude_type =
5161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5162                enum_type: "AdsbAltitudeType",
5163                value: tmp as u64,
5164            })?;
5165        let mut tmp = [0_u8; 9usize];
5166        for v in &mut tmp {
5167            *v = buf.get_u8();
5168        }
5169        __struct.callsign = CharArray::new(tmp);
5170        let tmp = buf.get_u8();
5171        __struct.emitter_type =
5172            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5173                enum_type: "AdsbEmitterType",
5174                value: tmp as u64,
5175            })?;
5176        __struct.tslc = buf.get_u8();
5177        Ok(__struct)
5178    }
5179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5180        let mut __tmp = BytesMut::new(bytes);
5181        #[allow(clippy::absurd_extreme_comparisons)]
5182        #[allow(unused_comparisons)]
5183        if __tmp.remaining() < Self::ENCODED_LEN {
5184            panic!(
5185                "buffer is too small (need {} bytes, but got {})",
5186                Self::ENCODED_LEN,
5187                __tmp.remaining(),
5188            )
5189        }
5190        __tmp.put_u32_le(self.ICAO_address);
5191        __tmp.put_i32_le(self.lat);
5192        __tmp.put_i32_le(self.lon);
5193        __tmp.put_i32_le(self.altitude);
5194        __tmp.put_u16_le(self.heading);
5195        __tmp.put_u16_le(self.hor_velocity);
5196        __tmp.put_i16_le(self.ver_velocity);
5197        __tmp.put_u16_le(self.flags.bits());
5198        __tmp.put_u16_le(self.squawk);
5199        __tmp.put_u8(self.altitude_type as u8);
5200        for val in &self.callsign {
5201            __tmp.put_u8(*val);
5202        }
5203        __tmp.put_u8(self.emitter_type as u8);
5204        __tmp.put_u8(self.tslc);
5205        if matches!(version, MavlinkVersion::V2) {
5206            let len = __tmp.len();
5207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5208        } else {
5209            __tmp.len()
5210        }
5211    }
5212}
5213#[doc = "Airspeed information from a sensor."]
5214#[doc = ""]
5215#[doc = "ID: 295"]
5216#[derive(Debug, Clone, PartialEq)]
5217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5219#[cfg_attr(feature = "ts", derive(TS))]
5220#[cfg_attr(feature = "ts", ts(export))]
5221pub struct AIRSPEED_DATA {
5222    #[doc = "Calibrated airspeed (CAS)."]
5223    pub airspeed: f32,
5224    #[doc = "Raw differential pressure. NaN for value unknown/not supplied."]
5225    pub raw_press: f32,
5226    #[doc = "Temperature. INT16_MAX for value unknown/not supplied."]
5227    pub temperature: i16,
5228    #[doc = "Sensor ID."]
5229    pub id: u8,
5230    #[doc = "Airspeed sensor flags."]
5231    pub flags: AirspeedSensorFlags,
5232}
5233impl AIRSPEED_DATA {
5234    pub const ENCODED_LEN: usize = 12usize;
5235    pub const DEFAULT: Self = Self {
5236        airspeed: 0.0_f32,
5237        raw_press: 0.0_f32,
5238        temperature: 0_i16,
5239        id: 0_u8,
5240        flags: AirspeedSensorFlags::DEFAULT,
5241    };
5242    #[cfg(feature = "arbitrary")]
5243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5244        use arbitrary::{Arbitrary, Unstructured};
5245        let mut buf = [0u8; 1024];
5246        rng.fill_bytes(&mut buf);
5247        let mut unstructured = Unstructured::new(&buf);
5248        Self::arbitrary(&mut unstructured).unwrap_or_default()
5249    }
5250}
5251impl Default for AIRSPEED_DATA {
5252    fn default() -> Self {
5253        Self::DEFAULT.clone()
5254    }
5255}
5256impl MessageData for AIRSPEED_DATA {
5257    type Message = MavMessage;
5258    const ID: u32 = 295u32;
5259    const NAME: &'static str = "AIRSPEED";
5260    const EXTRA_CRC: u8 = 234u8;
5261    const ENCODED_LEN: usize = 12usize;
5262    fn deser(
5263        _version: MavlinkVersion,
5264        __input: &[u8],
5265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5266        let avail_len = __input.len();
5267        let mut payload_buf = [0; Self::ENCODED_LEN];
5268        let mut buf = if avail_len < Self::ENCODED_LEN {
5269            payload_buf[0..avail_len].copy_from_slice(__input);
5270            Bytes::new(&payload_buf)
5271        } else {
5272            Bytes::new(__input)
5273        };
5274        let mut __struct = Self::default();
5275        __struct.airspeed = buf.get_f32_le();
5276        __struct.raw_press = buf.get_f32_le();
5277        __struct.temperature = buf.get_i16_le();
5278        __struct.id = buf.get_u8();
5279        let tmp = buf.get_u8();
5280        __struct.flags = AirspeedSensorFlags::from_bits(tmp).ok_or(
5281            ::mavlink_core::error::ParserError::InvalidFlag {
5282                flag_type: "AirspeedSensorFlags",
5283                value: tmp as u64,
5284            },
5285        )?;
5286        Ok(__struct)
5287    }
5288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5289        let mut __tmp = BytesMut::new(bytes);
5290        #[allow(clippy::absurd_extreme_comparisons)]
5291        #[allow(unused_comparisons)]
5292        if __tmp.remaining() < Self::ENCODED_LEN {
5293            panic!(
5294                "buffer is too small (need {} bytes, but got {})",
5295                Self::ENCODED_LEN,
5296                __tmp.remaining(),
5297            )
5298        }
5299        __tmp.put_f32_le(self.airspeed);
5300        __tmp.put_f32_le(self.raw_press);
5301        __tmp.put_i16_le(self.temperature);
5302        __tmp.put_u8(self.id);
5303        __tmp.put_u8(self.flags.bits());
5304        if matches!(version, MavlinkVersion::V2) {
5305            let len = __tmp.len();
5306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5307        } else {
5308            __tmp.len()
5309        }
5310    }
5311}
5312#[doc = "The location and information of an AIS vessel."]
5313#[doc = ""]
5314#[doc = "ID: 301"]
5315#[derive(Debug, Clone, PartialEq)]
5316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5318#[cfg_attr(feature = "ts", derive(TS))]
5319#[cfg_attr(feature = "ts", ts(export))]
5320pub struct AIS_VESSEL_DATA {
5321    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5322    pub MMSI: u32,
5323    #[doc = "Latitude"]
5324    pub lat: i32,
5325    #[doc = "Longitude"]
5326    pub lon: i32,
5327    #[doc = "Course over ground"]
5328    pub COG: u16,
5329    #[doc = "True heading"]
5330    pub heading: u16,
5331    #[doc = "Speed over ground"]
5332    pub velocity: u16,
5333    #[doc = "Distance from lat/lon location to bow"]
5334    pub dimension_bow: u16,
5335    #[doc = "Distance from lat/lon location to stern"]
5336    pub dimension_stern: u16,
5337    #[doc = "Time since last communication in seconds"]
5338    pub tslc: u16,
5339    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5340    pub flags: AisFlags,
5341    #[doc = "Turn rate"]
5342    pub turn_rate: i8,
5343    #[doc = "Navigational status"]
5344    pub navigational_status: AisNavStatus,
5345    #[doc = "Type of vessels"]
5346    pub mavtype: AisType,
5347    #[doc = "Distance from lat/lon location to port side"]
5348    pub dimension_port: u8,
5349    #[doc = "Distance from lat/lon location to starboard side"]
5350    pub dimension_starboard: u8,
5351    #[doc = "The vessel callsign"]
5352    #[cfg_attr(feature = "ts", ts(type = "string"))]
5353    pub callsign: CharArray<7>,
5354    #[doc = "The vessel name"]
5355    #[cfg_attr(feature = "ts", ts(type = "string"))]
5356    pub name: CharArray<20>,
5357}
5358impl AIS_VESSEL_DATA {
5359    pub const ENCODED_LEN: usize = 58usize;
5360    pub const DEFAULT: Self = Self {
5361        MMSI: 0_u32,
5362        lat: 0_i32,
5363        lon: 0_i32,
5364        COG: 0_u16,
5365        heading: 0_u16,
5366        velocity: 0_u16,
5367        dimension_bow: 0_u16,
5368        dimension_stern: 0_u16,
5369        tslc: 0_u16,
5370        flags: AisFlags::DEFAULT,
5371        turn_rate: 0_i8,
5372        navigational_status: AisNavStatus::DEFAULT,
5373        mavtype: AisType::DEFAULT,
5374        dimension_port: 0_u8,
5375        dimension_starboard: 0_u8,
5376        callsign: CharArray::new([0_u8; 7usize]),
5377        name: CharArray::new([0_u8; 20usize]),
5378    };
5379    #[cfg(feature = "arbitrary")]
5380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5381        use arbitrary::{Arbitrary, Unstructured};
5382        let mut buf = [0u8; 1024];
5383        rng.fill_bytes(&mut buf);
5384        let mut unstructured = Unstructured::new(&buf);
5385        Self::arbitrary(&mut unstructured).unwrap_or_default()
5386    }
5387}
5388impl Default for AIS_VESSEL_DATA {
5389    fn default() -> Self {
5390        Self::DEFAULT.clone()
5391    }
5392}
5393impl MessageData for AIS_VESSEL_DATA {
5394    type Message = MavMessage;
5395    const ID: u32 = 301u32;
5396    const NAME: &'static str = "AIS_VESSEL";
5397    const EXTRA_CRC: u8 = 243u8;
5398    const ENCODED_LEN: usize = 58usize;
5399    fn deser(
5400        _version: MavlinkVersion,
5401        __input: &[u8],
5402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5403        let avail_len = __input.len();
5404        let mut payload_buf = [0; Self::ENCODED_LEN];
5405        let mut buf = if avail_len < Self::ENCODED_LEN {
5406            payload_buf[0..avail_len].copy_from_slice(__input);
5407            Bytes::new(&payload_buf)
5408        } else {
5409            Bytes::new(__input)
5410        };
5411        let mut __struct = Self::default();
5412        __struct.MMSI = buf.get_u32_le();
5413        __struct.lat = buf.get_i32_le();
5414        __struct.lon = buf.get_i32_le();
5415        __struct.COG = buf.get_u16_le();
5416        __struct.heading = buf.get_u16_le();
5417        __struct.velocity = buf.get_u16_le();
5418        __struct.dimension_bow = buf.get_u16_le();
5419        __struct.dimension_stern = buf.get_u16_le();
5420        __struct.tslc = buf.get_u16_le();
5421        let tmp = buf.get_u16_le();
5422        __struct.flags =
5423            AisFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5424                flag_type: "AisFlags",
5425                value: tmp as u64,
5426            })?;
5427        __struct.turn_rate = buf.get_i8();
5428        let tmp = buf.get_u8();
5429        __struct.navigational_status =
5430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5431                enum_type: "AisNavStatus",
5432                value: tmp as u64,
5433            })?;
5434        let tmp = buf.get_u8();
5435        __struct.mavtype =
5436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5437                enum_type: "AisType",
5438                value: tmp as u64,
5439            })?;
5440        __struct.dimension_port = buf.get_u8();
5441        __struct.dimension_starboard = buf.get_u8();
5442        let mut tmp = [0_u8; 7usize];
5443        for v in &mut tmp {
5444            *v = buf.get_u8();
5445        }
5446        __struct.callsign = CharArray::new(tmp);
5447        let mut tmp = [0_u8; 20usize];
5448        for v in &mut tmp {
5449            *v = buf.get_u8();
5450        }
5451        __struct.name = CharArray::new(tmp);
5452        Ok(__struct)
5453    }
5454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5455        let mut __tmp = BytesMut::new(bytes);
5456        #[allow(clippy::absurd_extreme_comparisons)]
5457        #[allow(unused_comparisons)]
5458        if __tmp.remaining() < Self::ENCODED_LEN {
5459            panic!(
5460                "buffer is too small (need {} bytes, but got {})",
5461                Self::ENCODED_LEN,
5462                __tmp.remaining(),
5463            )
5464        }
5465        __tmp.put_u32_le(self.MMSI);
5466        __tmp.put_i32_le(self.lat);
5467        __tmp.put_i32_le(self.lon);
5468        __tmp.put_u16_le(self.COG);
5469        __tmp.put_u16_le(self.heading);
5470        __tmp.put_u16_le(self.velocity);
5471        __tmp.put_u16_le(self.dimension_bow);
5472        __tmp.put_u16_le(self.dimension_stern);
5473        __tmp.put_u16_le(self.tslc);
5474        __tmp.put_u16_le(self.flags.bits());
5475        __tmp.put_i8(self.turn_rate);
5476        __tmp.put_u8(self.navigational_status as u8);
5477        __tmp.put_u8(self.mavtype as u8);
5478        __tmp.put_u8(self.dimension_port);
5479        __tmp.put_u8(self.dimension_starboard);
5480        for val in &self.callsign {
5481            __tmp.put_u8(*val);
5482        }
5483        for val in &self.name {
5484            __tmp.put_u8(*val);
5485        }
5486        if matches!(version, MavlinkVersion::V2) {
5487            let len = __tmp.len();
5488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5489        } else {
5490            __tmp.len()
5491        }
5492    }
5493}
5494#[doc = "The current system altitude."]
5495#[doc = ""]
5496#[doc = "ID: 141"]
5497#[derive(Debug, Clone, PartialEq)]
5498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5500#[cfg_attr(feature = "ts", derive(TS))]
5501#[cfg_attr(feature = "ts", ts(export))]
5502pub struct ALTITUDE_DATA {
5503    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5504    pub time_usec: u64,
5505    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5506    pub altitude_monotonic: f32,
5507    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5508    pub altitude_amsl: f32,
5509    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5510    pub altitude_local: f32,
5511    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5512    pub altitude_relative: f32,
5513    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5514    pub altitude_terrain: f32,
5515    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5516    pub bottom_clearance: f32,
5517}
5518impl ALTITUDE_DATA {
5519    pub const ENCODED_LEN: usize = 32usize;
5520    pub const DEFAULT: Self = Self {
5521        time_usec: 0_u64,
5522        altitude_monotonic: 0.0_f32,
5523        altitude_amsl: 0.0_f32,
5524        altitude_local: 0.0_f32,
5525        altitude_relative: 0.0_f32,
5526        altitude_terrain: 0.0_f32,
5527        bottom_clearance: 0.0_f32,
5528    };
5529    #[cfg(feature = "arbitrary")]
5530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5531        use arbitrary::{Arbitrary, Unstructured};
5532        let mut buf = [0u8; 1024];
5533        rng.fill_bytes(&mut buf);
5534        let mut unstructured = Unstructured::new(&buf);
5535        Self::arbitrary(&mut unstructured).unwrap_or_default()
5536    }
5537}
5538impl Default for ALTITUDE_DATA {
5539    fn default() -> Self {
5540        Self::DEFAULT.clone()
5541    }
5542}
5543impl MessageData for ALTITUDE_DATA {
5544    type Message = MavMessage;
5545    const ID: u32 = 141u32;
5546    const NAME: &'static str = "ALTITUDE";
5547    const EXTRA_CRC: u8 = 47u8;
5548    const ENCODED_LEN: usize = 32usize;
5549    fn deser(
5550        _version: MavlinkVersion,
5551        __input: &[u8],
5552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5553        let avail_len = __input.len();
5554        let mut payload_buf = [0; Self::ENCODED_LEN];
5555        let mut buf = if avail_len < Self::ENCODED_LEN {
5556            payload_buf[0..avail_len].copy_from_slice(__input);
5557            Bytes::new(&payload_buf)
5558        } else {
5559            Bytes::new(__input)
5560        };
5561        let mut __struct = Self::default();
5562        __struct.time_usec = buf.get_u64_le();
5563        __struct.altitude_monotonic = buf.get_f32_le();
5564        __struct.altitude_amsl = buf.get_f32_le();
5565        __struct.altitude_local = buf.get_f32_le();
5566        __struct.altitude_relative = buf.get_f32_le();
5567        __struct.altitude_terrain = buf.get_f32_le();
5568        __struct.bottom_clearance = buf.get_f32_le();
5569        Ok(__struct)
5570    }
5571    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5572        let mut __tmp = BytesMut::new(bytes);
5573        #[allow(clippy::absurd_extreme_comparisons)]
5574        #[allow(unused_comparisons)]
5575        if __tmp.remaining() < Self::ENCODED_LEN {
5576            panic!(
5577                "buffer is too small (need {} bytes, but got {})",
5578                Self::ENCODED_LEN,
5579                __tmp.remaining(),
5580            )
5581        }
5582        __tmp.put_u64_le(self.time_usec);
5583        __tmp.put_f32_le(self.altitude_monotonic);
5584        __tmp.put_f32_le(self.altitude_amsl);
5585        __tmp.put_f32_le(self.altitude_local);
5586        __tmp.put_f32_le(self.altitude_relative);
5587        __tmp.put_f32_le(self.altitude_terrain);
5588        __tmp.put_f32_le(self.bottom_clearance);
5589        if matches!(version, MavlinkVersion::V2) {
5590            let len = __tmp.len();
5591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5592        } else {
5593            __tmp.len()
5594        }
5595    }
5596}
5597#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5598#[doc = ""]
5599#[doc = "ID: 30"]
5600#[derive(Debug, Clone, PartialEq)]
5601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5603#[cfg_attr(feature = "ts", derive(TS))]
5604#[cfg_attr(feature = "ts", ts(export))]
5605pub struct ATTITUDE_DATA {
5606    #[doc = "Timestamp (time since system boot)."]
5607    pub time_boot_ms: u32,
5608    #[doc = "Roll angle (-pi..+pi)"]
5609    pub roll: f32,
5610    #[doc = "Pitch angle (-pi..+pi)"]
5611    pub pitch: f32,
5612    #[doc = "Yaw angle (-pi..+pi)"]
5613    pub yaw: f32,
5614    #[doc = "Roll angular speed"]
5615    pub rollspeed: f32,
5616    #[doc = "Pitch angular speed"]
5617    pub pitchspeed: f32,
5618    #[doc = "Yaw angular speed"]
5619    pub yawspeed: f32,
5620}
5621impl ATTITUDE_DATA {
5622    pub const ENCODED_LEN: usize = 28usize;
5623    pub const DEFAULT: Self = Self {
5624        time_boot_ms: 0_u32,
5625        roll: 0.0_f32,
5626        pitch: 0.0_f32,
5627        yaw: 0.0_f32,
5628        rollspeed: 0.0_f32,
5629        pitchspeed: 0.0_f32,
5630        yawspeed: 0.0_f32,
5631    };
5632    #[cfg(feature = "arbitrary")]
5633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5634        use arbitrary::{Arbitrary, Unstructured};
5635        let mut buf = [0u8; 1024];
5636        rng.fill_bytes(&mut buf);
5637        let mut unstructured = Unstructured::new(&buf);
5638        Self::arbitrary(&mut unstructured).unwrap_or_default()
5639    }
5640}
5641impl Default for ATTITUDE_DATA {
5642    fn default() -> Self {
5643        Self::DEFAULT.clone()
5644    }
5645}
5646impl MessageData for ATTITUDE_DATA {
5647    type Message = MavMessage;
5648    const ID: u32 = 30u32;
5649    const NAME: &'static str = "ATTITUDE";
5650    const EXTRA_CRC: u8 = 39u8;
5651    const ENCODED_LEN: usize = 28usize;
5652    fn deser(
5653        _version: MavlinkVersion,
5654        __input: &[u8],
5655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5656        let avail_len = __input.len();
5657        let mut payload_buf = [0; Self::ENCODED_LEN];
5658        let mut buf = if avail_len < Self::ENCODED_LEN {
5659            payload_buf[0..avail_len].copy_from_slice(__input);
5660            Bytes::new(&payload_buf)
5661        } else {
5662            Bytes::new(__input)
5663        };
5664        let mut __struct = Self::default();
5665        __struct.time_boot_ms = buf.get_u32_le();
5666        __struct.roll = buf.get_f32_le();
5667        __struct.pitch = buf.get_f32_le();
5668        __struct.yaw = buf.get_f32_le();
5669        __struct.rollspeed = buf.get_f32_le();
5670        __struct.pitchspeed = buf.get_f32_le();
5671        __struct.yawspeed = buf.get_f32_le();
5672        Ok(__struct)
5673    }
5674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5675        let mut __tmp = BytesMut::new(bytes);
5676        #[allow(clippy::absurd_extreme_comparisons)]
5677        #[allow(unused_comparisons)]
5678        if __tmp.remaining() < Self::ENCODED_LEN {
5679            panic!(
5680                "buffer is too small (need {} bytes, but got {})",
5681                Self::ENCODED_LEN,
5682                __tmp.remaining(),
5683            )
5684        }
5685        __tmp.put_u32_le(self.time_boot_ms);
5686        __tmp.put_f32_le(self.roll);
5687        __tmp.put_f32_le(self.pitch);
5688        __tmp.put_f32_le(self.yaw);
5689        __tmp.put_f32_le(self.rollspeed);
5690        __tmp.put_f32_le(self.pitchspeed);
5691        __tmp.put_f32_le(self.yawspeed);
5692        if matches!(version, MavlinkVersion::V2) {
5693            let len = __tmp.len();
5694            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5695        } else {
5696            __tmp.len()
5697        }
5698    }
5699}
5700#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5701#[doc = ""]
5702#[doc = "ID: 31"]
5703#[derive(Debug, Clone, PartialEq)]
5704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5706#[cfg_attr(feature = "ts", derive(TS))]
5707#[cfg_attr(feature = "ts", ts(export))]
5708pub struct ATTITUDE_QUATERNION_DATA {
5709    #[doc = "Timestamp (time since system boot)."]
5710    pub time_boot_ms: u32,
5711    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5712    pub q1: f32,
5713    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5714    pub q2: f32,
5715    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5716    pub q3: f32,
5717    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5718    pub q4: f32,
5719    #[doc = "Roll angular speed"]
5720    pub rollspeed: f32,
5721    #[doc = "Pitch angular speed"]
5722    pub pitchspeed: f32,
5723    #[doc = "Yaw angular speed"]
5724    pub yawspeed: f32,
5725    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5727    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5728    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5729    pub repr_offset_q: [f32; 4],
5730}
5731impl ATTITUDE_QUATERNION_DATA {
5732    pub const ENCODED_LEN: usize = 48usize;
5733    pub const DEFAULT: Self = Self {
5734        time_boot_ms: 0_u32,
5735        q1: 0.0_f32,
5736        q2: 0.0_f32,
5737        q3: 0.0_f32,
5738        q4: 0.0_f32,
5739        rollspeed: 0.0_f32,
5740        pitchspeed: 0.0_f32,
5741        yawspeed: 0.0_f32,
5742        repr_offset_q: [0.0_f32; 4usize],
5743    };
5744    #[cfg(feature = "arbitrary")]
5745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5746        use arbitrary::{Arbitrary, Unstructured};
5747        let mut buf = [0u8; 1024];
5748        rng.fill_bytes(&mut buf);
5749        let mut unstructured = Unstructured::new(&buf);
5750        Self::arbitrary(&mut unstructured).unwrap_or_default()
5751    }
5752}
5753impl Default for ATTITUDE_QUATERNION_DATA {
5754    fn default() -> Self {
5755        Self::DEFAULT.clone()
5756    }
5757}
5758impl MessageData for ATTITUDE_QUATERNION_DATA {
5759    type Message = MavMessage;
5760    const ID: u32 = 31u32;
5761    const NAME: &'static str = "ATTITUDE_QUATERNION";
5762    const EXTRA_CRC: u8 = 246u8;
5763    const ENCODED_LEN: usize = 48usize;
5764    fn deser(
5765        _version: MavlinkVersion,
5766        __input: &[u8],
5767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5768        let avail_len = __input.len();
5769        let mut payload_buf = [0; Self::ENCODED_LEN];
5770        let mut buf = if avail_len < Self::ENCODED_LEN {
5771            payload_buf[0..avail_len].copy_from_slice(__input);
5772            Bytes::new(&payload_buf)
5773        } else {
5774            Bytes::new(__input)
5775        };
5776        let mut __struct = Self::default();
5777        __struct.time_boot_ms = buf.get_u32_le();
5778        __struct.q1 = buf.get_f32_le();
5779        __struct.q2 = buf.get_f32_le();
5780        __struct.q3 = buf.get_f32_le();
5781        __struct.q4 = buf.get_f32_le();
5782        __struct.rollspeed = buf.get_f32_le();
5783        __struct.pitchspeed = buf.get_f32_le();
5784        __struct.yawspeed = buf.get_f32_le();
5785        for v in &mut __struct.repr_offset_q {
5786            let val = buf.get_f32_le();
5787            *v = val;
5788        }
5789        Ok(__struct)
5790    }
5791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5792        let mut __tmp = BytesMut::new(bytes);
5793        #[allow(clippy::absurd_extreme_comparisons)]
5794        #[allow(unused_comparisons)]
5795        if __tmp.remaining() < Self::ENCODED_LEN {
5796            panic!(
5797                "buffer is too small (need {} bytes, but got {})",
5798                Self::ENCODED_LEN,
5799                __tmp.remaining(),
5800            )
5801        }
5802        __tmp.put_u32_le(self.time_boot_ms);
5803        __tmp.put_f32_le(self.q1);
5804        __tmp.put_f32_le(self.q2);
5805        __tmp.put_f32_le(self.q3);
5806        __tmp.put_f32_le(self.q4);
5807        __tmp.put_f32_le(self.rollspeed);
5808        __tmp.put_f32_le(self.pitchspeed);
5809        __tmp.put_f32_le(self.yawspeed);
5810        if matches!(version, MavlinkVersion::V2) {
5811            for val in &self.repr_offset_q {
5812                __tmp.put_f32_le(*val);
5813            }
5814            let len = __tmp.len();
5815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5816        } else {
5817            __tmp.len()
5818        }
5819    }
5820}
5821#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5822#[doc = ""]
5823#[doc = "ID: 61"]
5824#[derive(Debug, Clone, PartialEq)]
5825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5827#[cfg_attr(feature = "ts", derive(TS))]
5828#[cfg_attr(feature = "ts", ts(export))]
5829pub struct ATTITUDE_QUATERNION_COV_DATA {
5830    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5831    pub time_usec: u64,
5832    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5833    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5834    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5835    pub q: [f32; 4],
5836    #[doc = "Roll angular speed"]
5837    pub rollspeed: f32,
5838    #[doc = "Pitch angular speed"]
5839    pub pitchspeed: f32,
5840    #[doc = "Yaw angular speed"]
5841    pub yawspeed: f32,
5842    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5844    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5845    pub covariance: [f32; 9],
5846}
5847impl ATTITUDE_QUATERNION_COV_DATA {
5848    pub const ENCODED_LEN: usize = 72usize;
5849    pub const DEFAULT: Self = Self {
5850        time_usec: 0_u64,
5851        q: [0.0_f32; 4usize],
5852        rollspeed: 0.0_f32,
5853        pitchspeed: 0.0_f32,
5854        yawspeed: 0.0_f32,
5855        covariance: [0.0_f32; 9usize],
5856    };
5857    #[cfg(feature = "arbitrary")]
5858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5859        use arbitrary::{Arbitrary, Unstructured};
5860        let mut buf = [0u8; 1024];
5861        rng.fill_bytes(&mut buf);
5862        let mut unstructured = Unstructured::new(&buf);
5863        Self::arbitrary(&mut unstructured).unwrap_or_default()
5864    }
5865}
5866impl Default for ATTITUDE_QUATERNION_COV_DATA {
5867    fn default() -> Self {
5868        Self::DEFAULT.clone()
5869    }
5870}
5871impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5872    type Message = MavMessage;
5873    const ID: u32 = 61u32;
5874    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5875    const EXTRA_CRC: u8 = 167u8;
5876    const ENCODED_LEN: usize = 72usize;
5877    fn deser(
5878        _version: MavlinkVersion,
5879        __input: &[u8],
5880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5881        let avail_len = __input.len();
5882        let mut payload_buf = [0; Self::ENCODED_LEN];
5883        let mut buf = if avail_len < Self::ENCODED_LEN {
5884            payload_buf[0..avail_len].copy_from_slice(__input);
5885            Bytes::new(&payload_buf)
5886        } else {
5887            Bytes::new(__input)
5888        };
5889        let mut __struct = Self::default();
5890        __struct.time_usec = buf.get_u64_le();
5891        for v in &mut __struct.q {
5892            let val = buf.get_f32_le();
5893            *v = val;
5894        }
5895        __struct.rollspeed = buf.get_f32_le();
5896        __struct.pitchspeed = buf.get_f32_le();
5897        __struct.yawspeed = buf.get_f32_le();
5898        for v in &mut __struct.covariance {
5899            let val = buf.get_f32_le();
5900            *v = val;
5901        }
5902        Ok(__struct)
5903    }
5904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5905        let mut __tmp = BytesMut::new(bytes);
5906        #[allow(clippy::absurd_extreme_comparisons)]
5907        #[allow(unused_comparisons)]
5908        if __tmp.remaining() < Self::ENCODED_LEN {
5909            panic!(
5910                "buffer is too small (need {} bytes, but got {})",
5911                Self::ENCODED_LEN,
5912                __tmp.remaining(),
5913            )
5914        }
5915        __tmp.put_u64_le(self.time_usec);
5916        for val in &self.q {
5917            __tmp.put_f32_le(*val);
5918        }
5919        __tmp.put_f32_le(self.rollspeed);
5920        __tmp.put_f32_le(self.pitchspeed);
5921        __tmp.put_f32_le(self.yawspeed);
5922        for val in &self.covariance {
5923            __tmp.put_f32_le(*val);
5924        }
5925        if matches!(version, MavlinkVersion::V2) {
5926            let len = __tmp.len();
5927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5928        } else {
5929            __tmp.len()
5930        }
5931    }
5932}
5933#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5934#[doc = ""]
5935#[doc = "ID: 83"]
5936#[derive(Debug, Clone, PartialEq)]
5937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5939#[cfg_attr(feature = "ts", derive(TS))]
5940#[cfg_attr(feature = "ts", ts(export))]
5941pub struct ATTITUDE_TARGET_DATA {
5942    #[doc = "Timestamp (time since system boot)."]
5943    pub time_boot_ms: u32,
5944    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5947    pub q: [f32; 4],
5948    #[doc = "Body roll rate"]
5949    pub body_roll_rate: f32,
5950    #[doc = "Body pitch rate"]
5951    pub body_pitch_rate: f32,
5952    #[doc = "Body yaw rate"]
5953    pub body_yaw_rate: f32,
5954    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5955    pub thrust: f32,
5956    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5957    pub type_mask: AttitudeTargetTypemask,
5958}
5959impl ATTITUDE_TARGET_DATA {
5960    pub const ENCODED_LEN: usize = 37usize;
5961    pub const DEFAULT: Self = Self {
5962        time_boot_ms: 0_u32,
5963        q: [0.0_f32; 4usize],
5964        body_roll_rate: 0.0_f32,
5965        body_pitch_rate: 0.0_f32,
5966        body_yaw_rate: 0.0_f32,
5967        thrust: 0.0_f32,
5968        type_mask: AttitudeTargetTypemask::DEFAULT,
5969    };
5970    #[cfg(feature = "arbitrary")]
5971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5972        use arbitrary::{Arbitrary, Unstructured};
5973        let mut buf = [0u8; 1024];
5974        rng.fill_bytes(&mut buf);
5975        let mut unstructured = Unstructured::new(&buf);
5976        Self::arbitrary(&mut unstructured).unwrap_or_default()
5977    }
5978}
5979impl Default for ATTITUDE_TARGET_DATA {
5980    fn default() -> Self {
5981        Self::DEFAULT.clone()
5982    }
5983}
5984impl MessageData for ATTITUDE_TARGET_DATA {
5985    type Message = MavMessage;
5986    const ID: u32 = 83u32;
5987    const NAME: &'static str = "ATTITUDE_TARGET";
5988    const EXTRA_CRC: u8 = 22u8;
5989    const ENCODED_LEN: usize = 37usize;
5990    fn deser(
5991        _version: MavlinkVersion,
5992        __input: &[u8],
5993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5994        let avail_len = __input.len();
5995        let mut payload_buf = [0; Self::ENCODED_LEN];
5996        let mut buf = if avail_len < Self::ENCODED_LEN {
5997            payload_buf[0..avail_len].copy_from_slice(__input);
5998            Bytes::new(&payload_buf)
5999        } else {
6000            Bytes::new(__input)
6001        };
6002        let mut __struct = Self::default();
6003        __struct.time_boot_ms = buf.get_u32_le();
6004        for v in &mut __struct.q {
6005            let val = buf.get_f32_le();
6006            *v = val;
6007        }
6008        __struct.body_roll_rate = buf.get_f32_le();
6009        __struct.body_pitch_rate = buf.get_f32_le();
6010        __struct.body_yaw_rate = buf.get_f32_le();
6011        __struct.thrust = buf.get_f32_le();
6012        let tmp = buf.get_u8();
6013        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
6014            ::mavlink_core::error::ParserError::InvalidFlag {
6015                flag_type: "AttitudeTargetTypemask",
6016                value: tmp as u64,
6017            },
6018        )?;
6019        Ok(__struct)
6020    }
6021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6022        let mut __tmp = BytesMut::new(bytes);
6023        #[allow(clippy::absurd_extreme_comparisons)]
6024        #[allow(unused_comparisons)]
6025        if __tmp.remaining() < Self::ENCODED_LEN {
6026            panic!(
6027                "buffer is too small (need {} bytes, but got {})",
6028                Self::ENCODED_LEN,
6029                __tmp.remaining(),
6030            )
6031        }
6032        __tmp.put_u32_le(self.time_boot_ms);
6033        for val in &self.q {
6034            __tmp.put_f32_le(*val);
6035        }
6036        __tmp.put_f32_le(self.body_roll_rate);
6037        __tmp.put_f32_le(self.body_pitch_rate);
6038        __tmp.put_f32_le(self.body_yaw_rate);
6039        __tmp.put_f32_le(self.thrust);
6040        __tmp.put_u8(self.type_mask.bits());
6041        if matches!(version, MavlinkVersion::V2) {
6042            let len = __tmp.len();
6043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6044        } else {
6045            __tmp.len()
6046        }
6047    }
6048}
6049#[doc = "Motion capture attitude and position."]
6050#[doc = ""]
6051#[doc = "ID: 138"]
6052#[derive(Debug, Clone, PartialEq)]
6053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6055#[cfg_attr(feature = "ts", derive(TS))]
6056#[cfg_attr(feature = "ts", ts(export))]
6057pub struct ATT_POS_MOCAP_DATA {
6058    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6059    pub time_usec: u64,
6060    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6062    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6063    pub q: [f32; 4],
6064    #[doc = "X position (NED)"]
6065    pub x: f32,
6066    #[doc = "Y position (NED)"]
6067    pub y: f32,
6068    #[doc = "Z position (NED)"]
6069    pub z: f32,
6070    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6071    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6073    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6074    pub covariance: [f32; 21],
6075}
6076impl ATT_POS_MOCAP_DATA {
6077    pub const ENCODED_LEN: usize = 120usize;
6078    pub const DEFAULT: Self = Self {
6079        time_usec: 0_u64,
6080        q: [0.0_f32; 4usize],
6081        x: 0.0_f32,
6082        y: 0.0_f32,
6083        z: 0.0_f32,
6084        covariance: [0.0_f32; 21usize],
6085    };
6086    #[cfg(feature = "arbitrary")]
6087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6088        use arbitrary::{Arbitrary, Unstructured};
6089        let mut buf = [0u8; 1024];
6090        rng.fill_bytes(&mut buf);
6091        let mut unstructured = Unstructured::new(&buf);
6092        Self::arbitrary(&mut unstructured).unwrap_or_default()
6093    }
6094}
6095impl Default for ATT_POS_MOCAP_DATA {
6096    fn default() -> Self {
6097        Self::DEFAULT.clone()
6098    }
6099}
6100impl MessageData for ATT_POS_MOCAP_DATA {
6101    type Message = MavMessage;
6102    const ID: u32 = 138u32;
6103    const NAME: &'static str = "ATT_POS_MOCAP";
6104    const EXTRA_CRC: u8 = 109u8;
6105    const ENCODED_LEN: usize = 120usize;
6106    fn deser(
6107        _version: MavlinkVersion,
6108        __input: &[u8],
6109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6110        let avail_len = __input.len();
6111        let mut payload_buf = [0; Self::ENCODED_LEN];
6112        let mut buf = if avail_len < Self::ENCODED_LEN {
6113            payload_buf[0..avail_len].copy_from_slice(__input);
6114            Bytes::new(&payload_buf)
6115        } else {
6116            Bytes::new(__input)
6117        };
6118        let mut __struct = Self::default();
6119        __struct.time_usec = buf.get_u64_le();
6120        for v in &mut __struct.q {
6121            let val = buf.get_f32_le();
6122            *v = val;
6123        }
6124        __struct.x = buf.get_f32_le();
6125        __struct.y = buf.get_f32_le();
6126        __struct.z = buf.get_f32_le();
6127        for v in &mut __struct.covariance {
6128            let val = buf.get_f32_le();
6129            *v = val;
6130        }
6131        Ok(__struct)
6132    }
6133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6134        let mut __tmp = BytesMut::new(bytes);
6135        #[allow(clippy::absurd_extreme_comparisons)]
6136        #[allow(unused_comparisons)]
6137        if __tmp.remaining() < Self::ENCODED_LEN {
6138            panic!(
6139                "buffer is too small (need {} bytes, but got {})",
6140                Self::ENCODED_LEN,
6141                __tmp.remaining(),
6142            )
6143        }
6144        __tmp.put_u64_le(self.time_usec);
6145        for val in &self.q {
6146            __tmp.put_f32_le(*val);
6147        }
6148        __tmp.put_f32_le(self.x);
6149        __tmp.put_f32_le(self.y);
6150        __tmp.put_f32_le(self.z);
6151        if matches!(version, MavlinkVersion::V2) {
6152            for val in &self.covariance {
6153                __tmp.put_f32_le(*val);
6154            }
6155            let len = __tmp.len();
6156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6157        } else {
6158            __tmp.len()
6159        }
6160    }
6161}
6162#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6163#[doc = ""]
6164#[doc = "ID: 7"]
6165#[derive(Debug, Clone, PartialEq)]
6166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6168#[cfg_attr(feature = "ts", derive(TS))]
6169#[cfg_attr(feature = "ts", ts(export))]
6170pub struct AUTH_KEY_DATA {
6171    #[doc = "key"]
6172    #[cfg_attr(feature = "ts", ts(type = "string"))]
6173    pub key: CharArray<32>,
6174}
6175impl AUTH_KEY_DATA {
6176    pub const ENCODED_LEN: usize = 32usize;
6177    pub const DEFAULT: Self = Self {
6178        key: CharArray::new([0_u8; 32usize]),
6179    };
6180    #[cfg(feature = "arbitrary")]
6181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6182        use arbitrary::{Arbitrary, Unstructured};
6183        let mut buf = [0u8; 1024];
6184        rng.fill_bytes(&mut buf);
6185        let mut unstructured = Unstructured::new(&buf);
6186        Self::arbitrary(&mut unstructured).unwrap_or_default()
6187    }
6188}
6189impl Default for AUTH_KEY_DATA {
6190    fn default() -> Self {
6191        Self::DEFAULT.clone()
6192    }
6193}
6194impl MessageData for AUTH_KEY_DATA {
6195    type Message = MavMessage;
6196    const ID: u32 = 7u32;
6197    const NAME: &'static str = "AUTH_KEY";
6198    const EXTRA_CRC: u8 = 119u8;
6199    const ENCODED_LEN: usize = 32usize;
6200    fn deser(
6201        _version: MavlinkVersion,
6202        __input: &[u8],
6203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6204        let avail_len = __input.len();
6205        let mut payload_buf = [0; Self::ENCODED_LEN];
6206        let mut buf = if avail_len < Self::ENCODED_LEN {
6207            payload_buf[0..avail_len].copy_from_slice(__input);
6208            Bytes::new(&payload_buf)
6209        } else {
6210            Bytes::new(__input)
6211        };
6212        let mut __struct = Self::default();
6213        let mut tmp = [0_u8; 32usize];
6214        for v in &mut tmp {
6215            *v = buf.get_u8();
6216        }
6217        __struct.key = CharArray::new(tmp);
6218        Ok(__struct)
6219    }
6220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6221        let mut __tmp = BytesMut::new(bytes);
6222        #[allow(clippy::absurd_extreme_comparisons)]
6223        #[allow(unused_comparisons)]
6224        if __tmp.remaining() < Self::ENCODED_LEN {
6225            panic!(
6226                "buffer is too small (need {} bytes, but got {})",
6227                Self::ENCODED_LEN,
6228                __tmp.remaining(),
6229            )
6230        }
6231        for val in &self.key {
6232            __tmp.put_u8(*val);
6233        }
6234        if matches!(version, MavlinkVersion::V2) {
6235            let len = __tmp.len();
6236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6237        } else {
6238            __tmp.len()
6239        }
6240    }
6241}
6242#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6243#[doc = ""]
6244#[doc = "ID: 286"]
6245#[derive(Debug, Clone, PartialEq)]
6246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6248#[cfg_attr(feature = "ts", derive(TS))]
6249#[cfg_attr(feature = "ts", ts(export))]
6250pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6251    #[doc = "Timestamp (time since system boot)."]
6252    pub time_boot_us: u64,
6253    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6256    pub q: [f32; 4],
6257    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6258    pub q_estimated_delay_us: u32,
6259    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6260    pub vx: f32,
6261    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6262    pub vy: f32,
6263    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6264    pub vz: f32,
6265    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6266    pub v_estimated_delay_us: u32,
6267    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6268    pub feed_forward_angular_velocity_z: f32,
6269    #[doc = "Bitmap indicating which estimator outputs are valid."]
6270    pub estimator_status: EstimatorStatusFlags,
6271    #[doc = "System ID"]
6272    pub target_system: u8,
6273    #[doc = "Component ID"]
6274    pub target_component: u8,
6275    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6276    pub landed_state: MavLandedState,
6277    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6278    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6279    pub angular_velocity_z: f32,
6280}
6281impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6282    pub const ENCODED_LEN: usize = 57usize;
6283    pub const DEFAULT: Self = Self {
6284        time_boot_us: 0_u64,
6285        q: [0.0_f32; 4usize],
6286        q_estimated_delay_us: 0_u32,
6287        vx: 0.0_f32,
6288        vy: 0.0_f32,
6289        vz: 0.0_f32,
6290        v_estimated_delay_us: 0_u32,
6291        feed_forward_angular_velocity_z: 0.0_f32,
6292        estimator_status: EstimatorStatusFlags::DEFAULT,
6293        target_system: 0_u8,
6294        target_component: 0_u8,
6295        landed_state: MavLandedState::DEFAULT,
6296        angular_velocity_z: 0.0_f32,
6297    };
6298    #[cfg(feature = "arbitrary")]
6299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6300        use arbitrary::{Arbitrary, Unstructured};
6301        let mut buf = [0u8; 1024];
6302        rng.fill_bytes(&mut buf);
6303        let mut unstructured = Unstructured::new(&buf);
6304        Self::arbitrary(&mut unstructured).unwrap_or_default()
6305    }
6306}
6307impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6308    fn default() -> Self {
6309        Self::DEFAULT.clone()
6310    }
6311}
6312impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6313    type Message = MavMessage;
6314    const ID: u32 = 286u32;
6315    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6316    const EXTRA_CRC: u8 = 210u8;
6317    const ENCODED_LEN: usize = 57usize;
6318    fn deser(
6319        _version: MavlinkVersion,
6320        __input: &[u8],
6321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6322        let avail_len = __input.len();
6323        let mut payload_buf = [0; Self::ENCODED_LEN];
6324        let mut buf = if avail_len < Self::ENCODED_LEN {
6325            payload_buf[0..avail_len].copy_from_slice(__input);
6326            Bytes::new(&payload_buf)
6327        } else {
6328            Bytes::new(__input)
6329        };
6330        let mut __struct = Self::default();
6331        __struct.time_boot_us = buf.get_u64_le();
6332        for v in &mut __struct.q {
6333            let val = buf.get_f32_le();
6334            *v = val;
6335        }
6336        __struct.q_estimated_delay_us = buf.get_u32_le();
6337        __struct.vx = buf.get_f32_le();
6338        __struct.vy = buf.get_f32_le();
6339        __struct.vz = buf.get_f32_le();
6340        __struct.v_estimated_delay_us = buf.get_u32_le();
6341        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6342        let tmp = buf.get_u16_le();
6343        __struct.estimator_status = EstimatorStatusFlags::from_bits(tmp).ok_or(
6344            ::mavlink_core::error::ParserError::InvalidFlag {
6345                flag_type: "EstimatorStatusFlags",
6346                value: tmp as u64,
6347            },
6348        )?;
6349        __struct.target_system = buf.get_u8();
6350        __struct.target_component = buf.get_u8();
6351        let tmp = buf.get_u8();
6352        __struct.landed_state =
6353            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6354                enum_type: "MavLandedState",
6355                value: tmp as u64,
6356            })?;
6357        __struct.angular_velocity_z = buf.get_f32_le();
6358        Ok(__struct)
6359    }
6360    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6361        let mut __tmp = BytesMut::new(bytes);
6362        #[allow(clippy::absurd_extreme_comparisons)]
6363        #[allow(unused_comparisons)]
6364        if __tmp.remaining() < Self::ENCODED_LEN {
6365            panic!(
6366                "buffer is too small (need {} bytes, but got {})",
6367                Self::ENCODED_LEN,
6368                __tmp.remaining(),
6369            )
6370        }
6371        __tmp.put_u64_le(self.time_boot_us);
6372        for val in &self.q {
6373            __tmp.put_f32_le(*val);
6374        }
6375        __tmp.put_u32_le(self.q_estimated_delay_us);
6376        __tmp.put_f32_le(self.vx);
6377        __tmp.put_f32_le(self.vy);
6378        __tmp.put_f32_le(self.vz);
6379        __tmp.put_u32_le(self.v_estimated_delay_us);
6380        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6381        __tmp.put_u16_le(self.estimator_status.bits());
6382        __tmp.put_u8(self.target_system);
6383        __tmp.put_u8(self.target_component);
6384        __tmp.put_u8(self.landed_state as u8);
6385        if matches!(version, MavlinkVersion::V2) {
6386            __tmp.put_f32_le(self.angular_velocity_z);
6387            let len = __tmp.len();
6388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6389        } else {
6390            __tmp.len()
6391        }
6392    }
6393}
6394#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6395#[doc = ""]
6396#[doc = "ID: 148"]
6397#[derive(Debug, Clone, PartialEq)]
6398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6400#[cfg_attr(feature = "ts", derive(TS))]
6401#[cfg_attr(feature = "ts", ts(export))]
6402pub struct AUTOPILOT_VERSION_DATA {
6403    #[doc = "Bitmap of capabilities"]
6404    pub capabilities: MavProtocolCapability,
6405    #[doc = "UID if provided by hardware (see uid2)"]
6406    pub uid: u64,
6407    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6408    pub flight_sw_version: u32,
6409    #[doc = "Middleware version number"]
6410    pub middleware_sw_version: u32,
6411    #[doc = "Operating system version number"]
6412    pub os_sw_version: u32,
6413    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6414    pub board_version: u32,
6415    #[doc = "ID of the board vendor"]
6416    pub vendor_id: u16,
6417    #[doc = "ID of the product"]
6418    pub product_id: u16,
6419    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6420    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6421    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6422    pub flight_custom_version: [u8; 8],
6423    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6426    pub middleware_custom_version: [u8; 8],
6427    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6430    pub os_custom_version: [u8; 8],
6431    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6435    pub uid2: [u8; 18],
6436}
6437impl AUTOPILOT_VERSION_DATA {
6438    pub const ENCODED_LEN: usize = 78usize;
6439    pub const DEFAULT: Self = Self {
6440        capabilities: MavProtocolCapability::DEFAULT,
6441        uid: 0_u64,
6442        flight_sw_version: 0_u32,
6443        middleware_sw_version: 0_u32,
6444        os_sw_version: 0_u32,
6445        board_version: 0_u32,
6446        vendor_id: 0_u16,
6447        product_id: 0_u16,
6448        flight_custom_version: [0_u8; 8usize],
6449        middleware_custom_version: [0_u8; 8usize],
6450        os_custom_version: [0_u8; 8usize],
6451        uid2: [0_u8; 18usize],
6452    };
6453    #[cfg(feature = "arbitrary")]
6454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6455        use arbitrary::{Arbitrary, Unstructured};
6456        let mut buf = [0u8; 1024];
6457        rng.fill_bytes(&mut buf);
6458        let mut unstructured = Unstructured::new(&buf);
6459        Self::arbitrary(&mut unstructured).unwrap_or_default()
6460    }
6461}
6462impl Default for AUTOPILOT_VERSION_DATA {
6463    fn default() -> Self {
6464        Self::DEFAULT.clone()
6465    }
6466}
6467impl MessageData for AUTOPILOT_VERSION_DATA {
6468    type Message = MavMessage;
6469    const ID: u32 = 148u32;
6470    const NAME: &'static str = "AUTOPILOT_VERSION";
6471    const EXTRA_CRC: u8 = 178u8;
6472    const ENCODED_LEN: usize = 78usize;
6473    fn deser(
6474        _version: MavlinkVersion,
6475        __input: &[u8],
6476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6477        let avail_len = __input.len();
6478        let mut payload_buf = [0; Self::ENCODED_LEN];
6479        let mut buf = if avail_len < Self::ENCODED_LEN {
6480            payload_buf[0..avail_len].copy_from_slice(__input);
6481            Bytes::new(&payload_buf)
6482        } else {
6483            Bytes::new(__input)
6484        };
6485        let mut __struct = Self::default();
6486        let tmp = buf.get_u64_le();
6487        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
6488            ::mavlink_core::error::ParserError::InvalidFlag {
6489                flag_type: "MavProtocolCapability",
6490                value: tmp as u64,
6491            },
6492        )?;
6493        __struct.uid = buf.get_u64_le();
6494        __struct.flight_sw_version = buf.get_u32_le();
6495        __struct.middleware_sw_version = buf.get_u32_le();
6496        __struct.os_sw_version = buf.get_u32_le();
6497        __struct.board_version = buf.get_u32_le();
6498        __struct.vendor_id = buf.get_u16_le();
6499        __struct.product_id = buf.get_u16_le();
6500        for v in &mut __struct.flight_custom_version {
6501            let val = buf.get_u8();
6502            *v = val;
6503        }
6504        for v in &mut __struct.middleware_custom_version {
6505            let val = buf.get_u8();
6506            *v = val;
6507        }
6508        for v in &mut __struct.os_custom_version {
6509            let val = buf.get_u8();
6510            *v = val;
6511        }
6512        for v in &mut __struct.uid2 {
6513            let val = buf.get_u8();
6514            *v = val;
6515        }
6516        Ok(__struct)
6517    }
6518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6519        let mut __tmp = BytesMut::new(bytes);
6520        #[allow(clippy::absurd_extreme_comparisons)]
6521        #[allow(unused_comparisons)]
6522        if __tmp.remaining() < Self::ENCODED_LEN {
6523            panic!(
6524                "buffer is too small (need {} bytes, but got {})",
6525                Self::ENCODED_LEN,
6526                __tmp.remaining(),
6527            )
6528        }
6529        __tmp.put_u64_le(self.capabilities.bits());
6530        __tmp.put_u64_le(self.uid);
6531        __tmp.put_u32_le(self.flight_sw_version);
6532        __tmp.put_u32_le(self.middleware_sw_version);
6533        __tmp.put_u32_le(self.os_sw_version);
6534        __tmp.put_u32_le(self.board_version);
6535        __tmp.put_u16_le(self.vendor_id);
6536        __tmp.put_u16_le(self.product_id);
6537        for val in &self.flight_custom_version {
6538            __tmp.put_u8(*val);
6539        }
6540        for val in &self.middleware_custom_version {
6541            __tmp.put_u8(*val);
6542        }
6543        for val in &self.os_custom_version {
6544            __tmp.put_u8(*val);
6545        }
6546        if matches!(version, MavlinkVersion::V2) {
6547            for val in &self.uid2 {
6548                __tmp.put_u8(*val);
6549            }
6550            let len = __tmp.len();
6551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6552        } else {
6553            __tmp.len()
6554        }
6555    }
6556}
6557#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6558#[doc = ""]
6559#[doc = "ID: 435"]
6560#[derive(Debug, Clone, PartialEq)]
6561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6563#[cfg_attr(feature = "ts", derive(TS))]
6564#[cfg_attr(feature = "ts", ts(export))]
6565pub struct AVAILABLE_MODES_DATA {
6566    #[doc = "A bitfield for use for autopilot-specific flags"]
6567    pub custom_mode: u32,
6568    #[doc = "Mode properties."]
6569    pub properties: MavModeProperty,
6570    #[doc = "The total number of available modes for the current vehicle type."]
6571    pub number_modes: u8,
6572    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6573    pub mode_index: u8,
6574    #[doc = "Standard mode."]
6575    pub standard_mode: MavStandardMode,
6576    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6577    #[cfg_attr(feature = "ts", ts(type = "string"))]
6578    pub mode_name: CharArray<35>,
6579}
6580impl AVAILABLE_MODES_DATA {
6581    pub const ENCODED_LEN: usize = 46usize;
6582    pub const DEFAULT: Self = Self {
6583        custom_mode: 0_u32,
6584        properties: MavModeProperty::DEFAULT,
6585        number_modes: 0_u8,
6586        mode_index: 0_u8,
6587        standard_mode: MavStandardMode::DEFAULT,
6588        mode_name: CharArray::new([0_u8; 35usize]),
6589    };
6590    #[cfg(feature = "arbitrary")]
6591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6592        use arbitrary::{Arbitrary, Unstructured};
6593        let mut buf = [0u8; 1024];
6594        rng.fill_bytes(&mut buf);
6595        let mut unstructured = Unstructured::new(&buf);
6596        Self::arbitrary(&mut unstructured).unwrap_or_default()
6597    }
6598}
6599impl Default for AVAILABLE_MODES_DATA {
6600    fn default() -> Self {
6601        Self::DEFAULT.clone()
6602    }
6603}
6604impl MessageData for AVAILABLE_MODES_DATA {
6605    type Message = MavMessage;
6606    const ID: u32 = 435u32;
6607    const NAME: &'static str = "AVAILABLE_MODES";
6608    const EXTRA_CRC: u8 = 134u8;
6609    const ENCODED_LEN: usize = 46usize;
6610    fn deser(
6611        _version: MavlinkVersion,
6612        __input: &[u8],
6613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6614        let avail_len = __input.len();
6615        let mut payload_buf = [0; Self::ENCODED_LEN];
6616        let mut buf = if avail_len < Self::ENCODED_LEN {
6617            payload_buf[0..avail_len].copy_from_slice(__input);
6618            Bytes::new(&payload_buf)
6619        } else {
6620            Bytes::new(__input)
6621        };
6622        let mut __struct = Self::default();
6623        __struct.custom_mode = buf.get_u32_le();
6624        let tmp = buf.get_u32_le();
6625        __struct.properties = MavModeProperty::from_bits(tmp).ok_or(
6626            ::mavlink_core::error::ParserError::InvalidFlag {
6627                flag_type: "MavModeProperty",
6628                value: tmp as u64,
6629            },
6630        )?;
6631        __struct.number_modes = buf.get_u8();
6632        __struct.mode_index = buf.get_u8();
6633        let tmp = buf.get_u8();
6634        __struct.standard_mode =
6635            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6636                enum_type: "MavStandardMode",
6637                value: tmp as u64,
6638            })?;
6639        let mut tmp = [0_u8; 35usize];
6640        for v in &mut tmp {
6641            *v = buf.get_u8();
6642        }
6643        __struct.mode_name = CharArray::new(tmp);
6644        Ok(__struct)
6645    }
6646    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6647        let mut __tmp = BytesMut::new(bytes);
6648        #[allow(clippy::absurd_extreme_comparisons)]
6649        #[allow(unused_comparisons)]
6650        if __tmp.remaining() < Self::ENCODED_LEN {
6651            panic!(
6652                "buffer is too small (need {} bytes, but got {})",
6653                Self::ENCODED_LEN,
6654                __tmp.remaining(),
6655            )
6656        }
6657        __tmp.put_u32_le(self.custom_mode);
6658        __tmp.put_u32_le(self.properties.bits());
6659        __tmp.put_u8(self.number_modes);
6660        __tmp.put_u8(self.mode_index);
6661        __tmp.put_u8(self.standard_mode as u8);
6662        for val in &self.mode_name {
6663            __tmp.put_u8(*val);
6664        }
6665        if matches!(version, MavlinkVersion::V2) {
6666            let len = __tmp.len();
6667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6668        } else {
6669            __tmp.len()
6670        }
6671    }
6672}
6673#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6674#[doc = ""]
6675#[doc = "ID: 437"]
6676#[derive(Debug, Clone, PartialEq)]
6677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6679#[cfg_attr(feature = "ts", derive(TS))]
6680#[cfg_attr(feature = "ts", ts(export))]
6681pub struct AVAILABLE_MODES_MONITOR_DATA {
6682    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6683    pub seq: u8,
6684}
6685impl AVAILABLE_MODES_MONITOR_DATA {
6686    pub const ENCODED_LEN: usize = 1usize;
6687    pub const DEFAULT: Self = Self { seq: 0_u8 };
6688    #[cfg(feature = "arbitrary")]
6689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6690        use arbitrary::{Arbitrary, Unstructured};
6691        let mut buf = [0u8; 1024];
6692        rng.fill_bytes(&mut buf);
6693        let mut unstructured = Unstructured::new(&buf);
6694        Self::arbitrary(&mut unstructured).unwrap_or_default()
6695    }
6696}
6697impl Default for AVAILABLE_MODES_MONITOR_DATA {
6698    fn default() -> Self {
6699        Self::DEFAULT.clone()
6700    }
6701}
6702impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6703    type Message = MavMessage;
6704    const ID: u32 = 437u32;
6705    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6706    const EXTRA_CRC: u8 = 30u8;
6707    const ENCODED_LEN: usize = 1usize;
6708    fn deser(
6709        _version: MavlinkVersion,
6710        __input: &[u8],
6711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6712        let avail_len = __input.len();
6713        let mut payload_buf = [0; Self::ENCODED_LEN];
6714        let mut buf = if avail_len < Self::ENCODED_LEN {
6715            payload_buf[0..avail_len].copy_from_slice(__input);
6716            Bytes::new(&payload_buf)
6717        } else {
6718            Bytes::new(__input)
6719        };
6720        let mut __struct = Self::default();
6721        __struct.seq = buf.get_u8();
6722        Ok(__struct)
6723    }
6724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6725        let mut __tmp = BytesMut::new(bytes);
6726        #[allow(clippy::absurd_extreme_comparisons)]
6727        #[allow(unused_comparisons)]
6728        if __tmp.remaining() < Self::ENCODED_LEN {
6729            panic!(
6730                "buffer is too small (need {} bytes, but got {})",
6731                Self::ENCODED_LEN,
6732                __tmp.remaining(),
6733            )
6734        }
6735        __tmp.put_u8(self.seq);
6736        if matches!(version, MavlinkVersion::V2) {
6737            let len = __tmp.len();
6738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6739        } else {
6740            __tmp.len()
6741        }
6742    }
6743}
6744#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6745#[doc = ""]
6746#[doc = "ID: 372"]
6747#[derive(Debug, Clone, PartialEq)]
6748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6750#[cfg_attr(feature = "ts", derive(TS))]
6751#[cfg_attr(feature = "ts", ts(export))]
6752pub struct BATTERY_INFO_DATA {
6753    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6754    pub discharge_minimum_voltage: f32,
6755    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6756    pub charging_minimum_voltage: f32,
6757    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6758    pub resting_minimum_voltage: f32,
6759    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6760    pub charging_maximum_voltage: f32,
6761    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6762    pub charging_maximum_current: f32,
6763    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6764    pub nominal_voltage: f32,
6765    #[doc = "Maximum pack discharge current. 0: field not provided."]
6766    pub discharge_maximum_current: f32,
6767    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6768    pub discharge_maximum_burst_current: f32,
6769    #[doc = "Fully charged design capacity. 0: field not provided."]
6770    pub design_capacity: f32,
6771    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6772    pub full_charge_capacity: f32,
6773    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6774    pub cycle_count: u16,
6775    #[doc = "Battery weight. 0: field not provided."]
6776    pub weight: u16,
6777    #[doc = "Battery ID"]
6778    pub id: u8,
6779    #[doc = "Function of the battery."]
6780    pub battery_function: MavBatteryFunction,
6781    #[doc = "Type (chemistry) of the battery."]
6782    pub mavtype: MavBatteryType,
6783    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6784    pub state_of_health: u8,
6785    #[doc = "Number of battery cells in series. 0: field not provided."]
6786    pub cells_in_series: u8,
6787    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6788    #[cfg_attr(feature = "ts", ts(type = "string"))]
6789    pub manufacture_date: CharArray<9>,
6790    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6791    #[cfg_attr(feature = "ts", ts(type = "string"))]
6792    pub serial_number: CharArray<32>,
6793    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6794    #[cfg_attr(feature = "ts", ts(type = "string"))]
6795    pub name: CharArray<50>,
6796}
6797impl BATTERY_INFO_DATA {
6798    pub const ENCODED_LEN: usize = 140usize;
6799    pub const DEFAULT: Self = Self {
6800        discharge_minimum_voltage: 0.0_f32,
6801        charging_minimum_voltage: 0.0_f32,
6802        resting_minimum_voltage: 0.0_f32,
6803        charging_maximum_voltage: 0.0_f32,
6804        charging_maximum_current: 0.0_f32,
6805        nominal_voltage: 0.0_f32,
6806        discharge_maximum_current: 0.0_f32,
6807        discharge_maximum_burst_current: 0.0_f32,
6808        design_capacity: 0.0_f32,
6809        full_charge_capacity: 0.0_f32,
6810        cycle_count: 0_u16,
6811        weight: 0_u16,
6812        id: 0_u8,
6813        battery_function: MavBatteryFunction::DEFAULT,
6814        mavtype: MavBatteryType::DEFAULT,
6815        state_of_health: 0_u8,
6816        cells_in_series: 0_u8,
6817        manufacture_date: CharArray::new([0_u8; 9usize]),
6818        serial_number: CharArray::new([0_u8; 32usize]),
6819        name: CharArray::new([0_u8; 50usize]),
6820    };
6821    #[cfg(feature = "arbitrary")]
6822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6823        use arbitrary::{Arbitrary, Unstructured};
6824        let mut buf = [0u8; 1024];
6825        rng.fill_bytes(&mut buf);
6826        let mut unstructured = Unstructured::new(&buf);
6827        Self::arbitrary(&mut unstructured).unwrap_or_default()
6828    }
6829}
6830impl Default for BATTERY_INFO_DATA {
6831    fn default() -> Self {
6832        Self::DEFAULT.clone()
6833    }
6834}
6835impl MessageData for BATTERY_INFO_DATA {
6836    type Message = MavMessage;
6837    const ID: u32 = 372u32;
6838    const NAME: &'static str = "BATTERY_INFO";
6839    const EXTRA_CRC: u8 = 26u8;
6840    const ENCODED_LEN: usize = 140usize;
6841    fn deser(
6842        _version: MavlinkVersion,
6843        __input: &[u8],
6844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6845        let avail_len = __input.len();
6846        let mut payload_buf = [0; Self::ENCODED_LEN];
6847        let mut buf = if avail_len < Self::ENCODED_LEN {
6848            payload_buf[0..avail_len].copy_from_slice(__input);
6849            Bytes::new(&payload_buf)
6850        } else {
6851            Bytes::new(__input)
6852        };
6853        let mut __struct = Self::default();
6854        __struct.discharge_minimum_voltage = buf.get_f32_le();
6855        __struct.charging_minimum_voltage = buf.get_f32_le();
6856        __struct.resting_minimum_voltage = buf.get_f32_le();
6857        __struct.charging_maximum_voltage = buf.get_f32_le();
6858        __struct.charging_maximum_current = buf.get_f32_le();
6859        __struct.nominal_voltage = buf.get_f32_le();
6860        __struct.discharge_maximum_current = buf.get_f32_le();
6861        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6862        __struct.design_capacity = buf.get_f32_le();
6863        __struct.full_charge_capacity = buf.get_f32_le();
6864        __struct.cycle_count = buf.get_u16_le();
6865        __struct.weight = buf.get_u16_le();
6866        __struct.id = buf.get_u8();
6867        let tmp = buf.get_u8();
6868        __struct.battery_function =
6869            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6870                enum_type: "MavBatteryFunction",
6871                value: tmp as u64,
6872            })?;
6873        let tmp = buf.get_u8();
6874        __struct.mavtype =
6875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6876                enum_type: "MavBatteryType",
6877                value: tmp as u64,
6878            })?;
6879        __struct.state_of_health = buf.get_u8();
6880        __struct.cells_in_series = buf.get_u8();
6881        let mut tmp = [0_u8; 9usize];
6882        for v in &mut tmp {
6883            *v = buf.get_u8();
6884        }
6885        __struct.manufacture_date = CharArray::new(tmp);
6886        let mut tmp = [0_u8; 32usize];
6887        for v in &mut tmp {
6888            *v = buf.get_u8();
6889        }
6890        __struct.serial_number = CharArray::new(tmp);
6891        let mut tmp = [0_u8; 50usize];
6892        for v in &mut tmp {
6893            *v = buf.get_u8();
6894        }
6895        __struct.name = CharArray::new(tmp);
6896        Ok(__struct)
6897    }
6898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6899        let mut __tmp = BytesMut::new(bytes);
6900        #[allow(clippy::absurd_extreme_comparisons)]
6901        #[allow(unused_comparisons)]
6902        if __tmp.remaining() < Self::ENCODED_LEN {
6903            panic!(
6904                "buffer is too small (need {} bytes, but got {})",
6905                Self::ENCODED_LEN,
6906                __tmp.remaining(),
6907            )
6908        }
6909        __tmp.put_f32_le(self.discharge_minimum_voltage);
6910        __tmp.put_f32_le(self.charging_minimum_voltage);
6911        __tmp.put_f32_le(self.resting_minimum_voltage);
6912        __tmp.put_f32_le(self.charging_maximum_voltage);
6913        __tmp.put_f32_le(self.charging_maximum_current);
6914        __tmp.put_f32_le(self.nominal_voltage);
6915        __tmp.put_f32_le(self.discharge_maximum_current);
6916        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6917        __tmp.put_f32_le(self.design_capacity);
6918        __tmp.put_f32_le(self.full_charge_capacity);
6919        __tmp.put_u16_le(self.cycle_count);
6920        __tmp.put_u16_le(self.weight);
6921        __tmp.put_u8(self.id);
6922        __tmp.put_u8(self.battery_function as u8);
6923        __tmp.put_u8(self.mavtype as u8);
6924        __tmp.put_u8(self.state_of_health);
6925        __tmp.put_u8(self.cells_in_series);
6926        for val in &self.manufacture_date {
6927            __tmp.put_u8(*val);
6928        }
6929        for val in &self.serial_number {
6930            __tmp.put_u8(*val);
6931        }
6932        for val in &self.name {
6933            __tmp.put_u8(*val);
6934        }
6935        if matches!(version, MavlinkVersion::V2) {
6936            let len = __tmp.len();
6937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6938        } else {
6939            __tmp.len()
6940        }
6941    }
6942}
6943#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6944#[doc = ""]
6945#[doc = "ID: 147"]
6946#[derive(Debug, Clone, PartialEq)]
6947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6949#[cfg_attr(feature = "ts", derive(TS))]
6950#[cfg_attr(feature = "ts", ts(export))]
6951pub struct BATTERY_STATUS_DATA {
6952    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6953    pub current_consumed: i32,
6954    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6955    pub energy_consumed: i32,
6956    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6957    pub temperature: i16,
6958    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6960    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6961    pub voltages: [u16; 10],
6962    #[doc = "Battery current, -1: autopilot does not measure the current"]
6963    pub current_battery: i16,
6964    #[doc = "Battery ID"]
6965    pub id: u8,
6966    #[doc = "Function of the battery"]
6967    pub battery_function: MavBatteryFunction,
6968    #[doc = "Type (chemistry) of the battery"]
6969    pub mavtype: MavBatteryType,
6970    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6971    pub battery_remaining: i8,
6972    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6974    pub time_remaining: i32,
6975    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6976    #[cfg_attr(feature = "serde", serde(default))]
6977    pub charge_state: MavBatteryChargeState,
6978    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6981    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6982    pub voltages_ext: [u16; 4],
6983    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6984    #[cfg_attr(feature = "serde", serde(default))]
6985    pub mode: MavBatteryMode,
6986    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6987    #[cfg_attr(feature = "serde", serde(default))]
6988    pub fault_bitmask: MavBatteryFault,
6989}
6990impl BATTERY_STATUS_DATA {
6991    pub const ENCODED_LEN: usize = 54usize;
6992    pub const DEFAULT: Self = Self {
6993        current_consumed: 0_i32,
6994        energy_consumed: 0_i32,
6995        temperature: 0_i16,
6996        voltages: [0_u16; 10usize],
6997        current_battery: 0_i16,
6998        id: 0_u8,
6999        battery_function: MavBatteryFunction::DEFAULT,
7000        mavtype: MavBatteryType::DEFAULT,
7001        battery_remaining: 0_i8,
7002        time_remaining: 0_i32,
7003        charge_state: MavBatteryChargeState::DEFAULT,
7004        voltages_ext: [0_u16; 4usize],
7005        mode: MavBatteryMode::DEFAULT,
7006        fault_bitmask: MavBatteryFault::DEFAULT,
7007    };
7008    #[cfg(feature = "arbitrary")]
7009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7010        use arbitrary::{Arbitrary, Unstructured};
7011        let mut buf = [0u8; 1024];
7012        rng.fill_bytes(&mut buf);
7013        let mut unstructured = Unstructured::new(&buf);
7014        Self::arbitrary(&mut unstructured).unwrap_or_default()
7015    }
7016}
7017impl Default for BATTERY_STATUS_DATA {
7018    fn default() -> Self {
7019        Self::DEFAULT.clone()
7020    }
7021}
7022impl MessageData for BATTERY_STATUS_DATA {
7023    type Message = MavMessage;
7024    const ID: u32 = 147u32;
7025    const NAME: &'static str = "BATTERY_STATUS";
7026    const EXTRA_CRC: u8 = 154u8;
7027    const ENCODED_LEN: usize = 54usize;
7028    fn deser(
7029        _version: MavlinkVersion,
7030        __input: &[u8],
7031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7032        let avail_len = __input.len();
7033        let mut payload_buf = [0; Self::ENCODED_LEN];
7034        let mut buf = if avail_len < Self::ENCODED_LEN {
7035            payload_buf[0..avail_len].copy_from_slice(__input);
7036            Bytes::new(&payload_buf)
7037        } else {
7038            Bytes::new(__input)
7039        };
7040        let mut __struct = Self::default();
7041        __struct.current_consumed = buf.get_i32_le();
7042        __struct.energy_consumed = buf.get_i32_le();
7043        __struct.temperature = buf.get_i16_le();
7044        for v in &mut __struct.voltages {
7045            let val = buf.get_u16_le();
7046            *v = val;
7047        }
7048        __struct.current_battery = buf.get_i16_le();
7049        __struct.id = buf.get_u8();
7050        let tmp = buf.get_u8();
7051        __struct.battery_function =
7052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7053                enum_type: "MavBatteryFunction",
7054                value: tmp as u64,
7055            })?;
7056        let tmp = buf.get_u8();
7057        __struct.mavtype =
7058            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7059                enum_type: "MavBatteryType",
7060                value: tmp as u64,
7061            })?;
7062        __struct.battery_remaining = buf.get_i8();
7063        __struct.time_remaining = buf.get_i32_le();
7064        let tmp = buf.get_u8();
7065        __struct.charge_state =
7066            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7067                enum_type: "MavBatteryChargeState",
7068                value: tmp as u64,
7069            })?;
7070        for v in &mut __struct.voltages_ext {
7071            let val = buf.get_u16_le();
7072            *v = val;
7073        }
7074        let tmp = buf.get_u8();
7075        __struct.mode =
7076            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7077                enum_type: "MavBatteryMode",
7078                value: tmp as u64,
7079            })?;
7080        let tmp = buf.get_u32_le();
7081        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp).ok_or(
7082            ::mavlink_core::error::ParserError::InvalidFlag {
7083                flag_type: "MavBatteryFault",
7084                value: tmp as u64,
7085            },
7086        )?;
7087        Ok(__struct)
7088    }
7089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7090        let mut __tmp = BytesMut::new(bytes);
7091        #[allow(clippy::absurd_extreme_comparisons)]
7092        #[allow(unused_comparisons)]
7093        if __tmp.remaining() < Self::ENCODED_LEN {
7094            panic!(
7095                "buffer is too small (need {} bytes, but got {})",
7096                Self::ENCODED_LEN,
7097                __tmp.remaining(),
7098            )
7099        }
7100        __tmp.put_i32_le(self.current_consumed);
7101        __tmp.put_i32_le(self.energy_consumed);
7102        __tmp.put_i16_le(self.temperature);
7103        for val in &self.voltages {
7104            __tmp.put_u16_le(*val);
7105        }
7106        __tmp.put_i16_le(self.current_battery);
7107        __tmp.put_u8(self.id);
7108        __tmp.put_u8(self.battery_function as u8);
7109        __tmp.put_u8(self.mavtype as u8);
7110        __tmp.put_i8(self.battery_remaining);
7111        if matches!(version, MavlinkVersion::V2) {
7112            __tmp.put_i32_le(self.time_remaining);
7113            __tmp.put_u8(self.charge_state as u8);
7114            for val in &self.voltages_ext {
7115                __tmp.put_u16_le(*val);
7116            }
7117            __tmp.put_u8(self.mode as u8);
7118            __tmp.put_u32_le(self.fault_bitmask.bits());
7119            let len = __tmp.len();
7120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7121        } else {
7122            __tmp.len()
7123        }
7124    }
7125}
7126#[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
7127#[doc = ""]
7128#[doc = "ID: 369"]
7129#[derive(Debug, Clone, PartialEq)]
7130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7132#[cfg_attr(feature = "ts", derive(TS))]
7133#[cfg_attr(feature = "ts", ts(export))]
7134pub struct BATTERY_STATUS_V2_DATA {
7135    #[doc = "Battery voltage (total). NaN: field not provided."]
7136    pub voltage: f32,
7137    #[doc = "Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided."]
7138    pub current: f32,
7139    #[doc = "Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL."]
7140    pub capacity_consumed: f32,
7141    #[doc = "Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered."]
7142    pub capacity_remaining: f32,
7143    #[doc = "Fault, health, readiness, and other status indications."]
7144    pub status_flags: MavBatteryStatusFlags,
7145    #[doc = "Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided."]
7146    pub temperature: i16,
7147    #[doc = "Battery ID"]
7148    pub id: u8,
7149    #[doc = "Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided."]
7150    pub percent_remaining: u8,
7151}
7152impl BATTERY_STATUS_V2_DATA {
7153    pub const ENCODED_LEN: usize = 24usize;
7154    pub const DEFAULT: Self = Self {
7155        voltage: 0.0_f32,
7156        current: 0.0_f32,
7157        capacity_consumed: 0.0_f32,
7158        capacity_remaining: 0.0_f32,
7159        status_flags: MavBatteryStatusFlags::DEFAULT,
7160        temperature: 0_i16,
7161        id: 0_u8,
7162        percent_remaining: 0_u8,
7163    };
7164    #[cfg(feature = "arbitrary")]
7165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7166        use arbitrary::{Arbitrary, Unstructured};
7167        let mut buf = [0u8; 1024];
7168        rng.fill_bytes(&mut buf);
7169        let mut unstructured = Unstructured::new(&buf);
7170        Self::arbitrary(&mut unstructured).unwrap_or_default()
7171    }
7172}
7173impl Default for BATTERY_STATUS_V2_DATA {
7174    fn default() -> Self {
7175        Self::DEFAULT.clone()
7176    }
7177}
7178impl MessageData for BATTERY_STATUS_V2_DATA {
7179    type Message = MavMessage;
7180    const ID: u32 = 369u32;
7181    const NAME: &'static str = "BATTERY_STATUS_V2";
7182    const EXTRA_CRC: u8 = 151u8;
7183    const ENCODED_LEN: usize = 24usize;
7184    fn deser(
7185        _version: MavlinkVersion,
7186        __input: &[u8],
7187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7188        let avail_len = __input.len();
7189        let mut payload_buf = [0; Self::ENCODED_LEN];
7190        let mut buf = if avail_len < Self::ENCODED_LEN {
7191            payload_buf[0..avail_len].copy_from_slice(__input);
7192            Bytes::new(&payload_buf)
7193        } else {
7194            Bytes::new(__input)
7195        };
7196        let mut __struct = Self::default();
7197        __struct.voltage = buf.get_f32_le();
7198        __struct.current = buf.get_f32_le();
7199        __struct.capacity_consumed = buf.get_f32_le();
7200        __struct.capacity_remaining = buf.get_f32_le();
7201        let tmp = buf.get_u32_le();
7202        __struct.status_flags = MavBatteryStatusFlags::from_bits(tmp).ok_or(
7203            ::mavlink_core::error::ParserError::InvalidFlag {
7204                flag_type: "MavBatteryStatusFlags",
7205                value: tmp as u64,
7206            },
7207        )?;
7208        __struct.temperature = buf.get_i16_le();
7209        __struct.id = buf.get_u8();
7210        __struct.percent_remaining = buf.get_u8();
7211        Ok(__struct)
7212    }
7213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7214        let mut __tmp = BytesMut::new(bytes);
7215        #[allow(clippy::absurd_extreme_comparisons)]
7216        #[allow(unused_comparisons)]
7217        if __tmp.remaining() < Self::ENCODED_LEN {
7218            panic!(
7219                "buffer is too small (need {} bytes, but got {})",
7220                Self::ENCODED_LEN,
7221                __tmp.remaining(),
7222            )
7223        }
7224        __tmp.put_f32_le(self.voltage);
7225        __tmp.put_f32_le(self.current);
7226        __tmp.put_f32_le(self.capacity_consumed);
7227        __tmp.put_f32_le(self.capacity_remaining);
7228        __tmp.put_u32_le(self.status_flags.bits());
7229        __tmp.put_i16_le(self.temperature);
7230        __tmp.put_u8(self.id);
7231        __tmp.put_u8(self.percent_remaining);
7232        if matches!(version, MavlinkVersion::V2) {
7233            let len = __tmp.len();
7234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7235        } else {
7236            __tmp.len()
7237        }
7238    }
7239}
7240#[doc = "Report button state change."]
7241#[doc = ""]
7242#[doc = "ID: 257"]
7243#[derive(Debug, Clone, PartialEq)]
7244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7246#[cfg_attr(feature = "ts", derive(TS))]
7247#[cfg_attr(feature = "ts", ts(export))]
7248pub struct BUTTON_CHANGE_DATA {
7249    #[doc = "Timestamp (time since system boot)."]
7250    pub time_boot_ms: u32,
7251    #[doc = "Time of last change of button state."]
7252    pub last_change_ms: u32,
7253    #[doc = "Bitmap for state of buttons."]
7254    pub state: u8,
7255}
7256impl BUTTON_CHANGE_DATA {
7257    pub const ENCODED_LEN: usize = 9usize;
7258    pub const DEFAULT: Self = Self {
7259        time_boot_ms: 0_u32,
7260        last_change_ms: 0_u32,
7261        state: 0_u8,
7262    };
7263    #[cfg(feature = "arbitrary")]
7264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7265        use arbitrary::{Arbitrary, Unstructured};
7266        let mut buf = [0u8; 1024];
7267        rng.fill_bytes(&mut buf);
7268        let mut unstructured = Unstructured::new(&buf);
7269        Self::arbitrary(&mut unstructured).unwrap_or_default()
7270    }
7271}
7272impl Default for BUTTON_CHANGE_DATA {
7273    fn default() -> Self {
7274        Self::DEFAULT.clone()
7275    }
7276}
7277impl MessageData for BUTTON_CHANGE_DATA {
7278    type Message = MavMessage;
7279    const ID: u32 = 257u32;
7280    const NAME: &'static str = "BUTTON_CHANGE";
7281    const EXTRA_CRC: u8 = 131u8;
7282    const ENCODED_LEN: usize = 9usize;
7283    fn deser(
7284        _version: MavlinkVersion,
7285        __input: &[u8],
7286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7287        let avail_len = __input.len();
7288        let mut payload_buf = [0; Self::ENCODED_LEN];
7289        let mut buf = if avail_len < Self::ENCODED_LEN {
7290            payload_buf[0..avail_len].copy_from_slice(__input);
7291            Bytes::new(&payload_buf)
7292        } else {
7293            Bytes::new(__input)
7294        };
7295        let mut __struct = Self::default();
7296        __struct.time_boot_ms = buf.get_u32_le();
7297        __struct.last_change_ms = buf.get_u32_le();
7298        __struct.state = buf.get_u8();
7299        Ok(__struct)
7300    }
7301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7302        let mut __tmp = BytesMut::new(bytes);
7303        #[allow(clippy::absurd_extreme_comparisons)]
7304        #[allow(unused_comparisons)]
7305        if __tmp.remaining() < Self::ENCODED_LEN {
7306            panic!(
7307                "buffer is too small (need {} bytes, but got {})",
7308                Self::ENCODED_LEN,
7309                __tmp.remaining(),
7310            )
7311        }
7312        __tmp.put_u32_le(self.time_boot_ms);
7313        __tmp.put_u32_le(self.last_change_ms);
7314        __tmp.put_u8(self.state);
7315        if matches!(version, MavlinkVersion::V2) {
7316            let len = __tmp.len();
7317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7318        } else {
7319            __tmp.len()
7320        }
7321    }
7322}
7323#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7324#[doc = ""]
7325#[doc = "ID: 262"]
7326#[derive(Debug, Clone, PartialEq)]
7327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7329#[cfg_attr(feature = "ts", derive(TS))]
7330#[cfg_attr(feature = "ts", ts(export))]
7331pub struct CAMERA_CAPTURE_STATUS_DATA {
7332    #[doc = "Timestamp (time since system boot)."]
7333    pub time_boot_ms: u32,
7334    #[doc = "Image capture interval"]
7335    pub image_interval: f32,
7336    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7337    pub recording_time_ms: u32,
7338    #[doc = "Available storage capacity."]
7339    pub available_capacity: f32,
7340    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7341    pub image_status: u8,
7342    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7343    pub video_status: u8,
7344    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7346    pub image_count: i32,
7347    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7349    pub camera_device_id: u8,
7350}
7351impl CAMERA_CAPTURE_STATUS_DATA {
7352    pub const ENCODED_LEN: usize = 23usize;
7353    pub const DEFAULT: Self = Self {
7354        time_boot_ms: 0_u32,
7355        image_interval: 0.0_f32,
7356        recording_time_ms: 0_u32,
7357        available_capacity: 0.0_f32,
7358        image_status: 0_u8,
7359        video_status: 0_u8,
7360        image_count: 0_i32,
7361        camera_device_id: 0_u8,
7362    };
7363    #[cfg(feature = "arbitrary")]
7364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7365        use arbitrary::{Arbitrary, Unstructured};
7366        let mut buf = [0u8; 1024];
7367        rng.fill_bytes(&mut buf);
7368        let mut unstructured = Unstructured::new(&buf);
7369        Self::arbitrary(&mut unstructured).unwrap_or_default()
7370    }
7371}
7372impl Default for CAMERA_CAPTURE_STATUS_DATA {
7373    fn default() -> Self {
7374        Self::DEFAULT.clone()
7375    }
7376}
7377impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7378    type Message = MavMessage;
7379    const ID: u32 = 262u32;
7380    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7381    const EXTRA_CRC: u8 = 12u8;
7382    const ENCODED_LEN: usize = 23usize;
7383    fn deser(
7384        _version: MavlinkVersion,
7385        __input: &[u8],
7386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7387        let avail_len = __input.len();
7388        let mut payload_buf = [0; Self::ENCODED_LEN];
7389        let mut buf = if avail_len < Self::ENCODED_LEN {
7390            payload_buf[0..avail_len].copy_from_slice(__input);
7391            Bytes::new(&payload_buf)
7392        } else {
7393            Bytes::new(__input)
7394        };
7395        let mut __struct = Self::default();
7396        __struct.time_boot_ms = buf.get_u32_le();
7397        __struct.image_interval = buf.get_f32_le();
7398        __struct.recording_time_ms = buf.get_u32_le();
7399        __struct.available_capacity = buf.get_f32_le();
7400        __struct.image_status = buf.get_u8();
7401        __struct.video_status = buf.get_u8();
7402        __struct.image_count = buf.get_i32_le();
7403        __struct.camera_device_id = buf.get_u8();
7404        Ok(__struct)
7405    }
7406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7407        let mut __tmp = BytesMut::new(bytes);
7408        #[allow(clippy::absurd_extreme_comparisons)]
7409        #[allow(unused_comparisons)]
7410        if __tmp.remaining() < Self::ENCODED_LEN {
7411            panic!(
7412                "buffer is too small (need {} bytes, but got {})",
7413                Self::ENCODED_LEN,
7414                __tmp.remaining(),
7415            )
7416        }
7417        __tmp.put_u32_le(self.time_boot_ms);
7418        __tmp.put_f32_le(self.image_interval);
7419        __tmp.put_u32_le(self.recording_time_ms);
7420        __tmp.put_f32_le(self.available_capacity);
7421        __tmp.put_u8(self.image_status);
7422        __tmp.put_u8(self.video_status);
7423        if matches!(version, MavlinkVersion::V2) {
7424            __tmp.put_i32_le(self.image_count);
7425            __tmp.put_u8(self.camera_device_id);
7426            let len = __tmp.len();
7427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7428        } else {
7429            __tmp.len()
7430        }
7431    }
7432}
7433#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7434#[doc = ""]
7435#[doc = "ID: 271"]
7436#[derive(Debug, Clone, PartialEq)]
7437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7439#[cfg_attr(feature = "ts", derive(TS))]
7440#[cfg_attr(feature = "ts", ts(export))]
7441pub struct CAMERA_FOV_STATUS_DATA {
7442    #[doc = "Timestamp (time since system boot)."]
7443    pub time_boot_ms: u32,
7444    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7445    pub lat_camera: i32,
7446    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7447    pub lon_camera: i32,
7448    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7449    pub alt_camera: i32,
7450    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7451    pub lat_image: i32,
7452    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7453    pub lon_image: i32,
7454    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7455    pub alt_image: i32,
7456    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7458    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7459    pub q: [f32; 4],
7460    #[doc = "Horizontal field of view (NaN if unknown)."]
7461    pub hfov: f32,
7462    #[doc = "Vertical field of view (NaN if unknown)."]
7463    pub vfov: f32,
7464    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7465    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7466    pub camera_device_id: u8,
7467}
7468impl CAMERA_FOV_STATUS_DATA {
7469    pub const ENCODED_LEN: usize = 53usize;
7470    pub const DEFAULT: Self = Self {
7471        time_boot_ms: 0_u32,
7472        lat_camera: 0_i32,
7473        lon_camera: 0_i32,
7474        alt_camera: 0_i32,
7475        lat_image: 0_i32,
7476        lon_image: 0_i32,
7477        alt_image: 0_i32,
7478        q: [0.0_f32; 4usize],
7479        hfov: 0.0_f32,
7480        vfov: 0.0_f32,
7481        camera_device_id: 0_u8,
7482    };
7483    #[cfg(feature = "arbitrary")]
7484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7485        use arbitrary::{Arbitrary, Unstructured};
7486        let mut buf = [0u8; 1024];
7487        rng.fill_bytes(&mut buf);
7488        let mut unstructured = Unstructured::new(&buf);
7489        Self::arbitrary(&mut unstructured).unwrap_or_default()
7490    }
7491}
7492impl Default for CAMERA_FOV_STATUS_DATA {
7493    fn default() -> Self {
7494        Self::DEFAULT.clone()
7495    }
7496}
7497impl MessageData for CAMERA_FOV_STATUS_DATA {
7498    type Message = MavMessage;
7499    const ID: u32 = 271u32;
7500    const NAME: &'static str = "CAMERA_FOV_STATUS";
7501    const EXTRA_CRC: u8 = 22u8;
7502    const ENCODED_LEN: usize = 53usize;
7503    fn deser(
7504        _version: MavlinkVersion,
7505        __input: &[u8],
7506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7507        let avail_len = __input.len();
7508        let mut payload_buf = [0; Self::ENCODED_LEN];
7509        let mut buf = if avail_len < Self::ENCODED_LEN {
7510            payload_buf[0..avail_len].copy_from_slice(__input);
7511            Bytes::new(&payload_buf)
7512        } else {
7513            Bytes::new(__input)
7514        };
7515        let mut __struct = Self::default();
7516        __struct.time_boot_ms = buf.get_u32_le();
7517        __struct.lat_camera = buf.get_i32_le();
7518        __struct.lon_camera = buf.get_i32_le();
7519        __struct.alt_camera = buf.get_i32_le();
7520        __struct.lat_image = buf.get_i32_le();
7521        __struct.lon_image = buf.get_i32_le();
7522        __struct.alt_image = buf.get_i32_le();
7523        for v in &mut __struct.q {
7524            let val = buf.get_f32_le();
7525            *v = val;
7526        }
7527        __struct.hfov = buf.get_f32_le();
7528        __struct.vfov = buf.get_f32_le();
7529        __struct.camera_device_id = buf.get_u8();
7530        Ok(__struct)
7531    }
7532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7533        let mut __tmp = BytesMut::new(bytes);
7534        #[allow(clippy::absurd_extreme_comparisons)]
7535        #[allow(unused_comparisons)]
7536        if __tmp.remaining() < Self::ENCODED_LEN {
7537            panic!(
7538                "buffer is too small (need {} bytes, but got {})",
7539                Self::ENCODED_LEN,
7540                __tmp.remaining(),
7541            )
7542        }
7543        __tmp.put_u32_le(self.time_boot_ms);
7544        __tmp.put_i32_le(self.lat_camera);
7545        __tmp.put_i32_le(self.lon_camera);
7546        __tmp.put_i32_le(self.alt_camera);
7547        __tmp.put_i32_le(self.lat_image);
7548        __tmp.put_i32_le(self.lon_image);
7549        __tmp.put_i32_le(self.alt_image);
7550        for val in &self.q {
7551            __tmp.put_f32_le(*val);
7552        }
7553        __tmp.put_f32_le(self.hfov);
7554        __tmp.put_f32_le(self.vfov);
7555        if matches!(version, MavlinkVersion::V2) {
7556            __tmp.put_u8(self.camera_device_id);
7557            let len = __tmp.len();
7558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7559        } else {
7560            __tmp.len()
7561        }
7562    }
7563}
7564#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7565#[doc = ""]
7566#[doc = "ID: 263"]
7567#[derive(Debug, Clone, PartialEq)]
7568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7570#[cfg_attr(feature = "ts", derive(TS))]
7571#[cfg_attr(feature = "ts", ts(export))]
7572pub struct CAMERA_IMAGE_CAPTURED_DATA {
7573    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7574    pub time_utc: u64,
7575    #[doc = "Timestamp (time since system boot)."]
7576    pub time_boot_ms: u32,
7577    #[doc = "Latitude where image was taken"]
7578    pub lat: i32,
7579    #[doc = "Longitude where capture was taken"]
7580    pub lon: i32,
7581    #[doc = "Altitude (MSL) where image was taken"]
7582    pub alt: i32,
7583    #[doc = "Altitude above ground"]
7584    pub relative_alt: i32,
7585    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7587    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7588    pub q: [f32; 4],
7589    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7590    pub image_index: i32,
7591    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7592    pub camera_id: u8,
7593    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7594    pub capture_result: i8,
7595    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7596    #[cfg_attr(feature = "ts", ts(type = "string"))]
7597    pub file_url: CharArray<205>,
7598}
7599impl CAMERA_IMAGE_CAPTURED_DATA {
7600    pub const ENCODED_LEN: usize = 255usize;
7601    pub const DEFAULT: Self = Self {
7602        time_utc: 0_u64,
7603        time_boot_ms: 0_u32,
7604        lat: 0_i32,
7605        lon: 0_i32,
7606        alt: 0_i32,
7607        relative_alt: 0_i32,
7608        q: [0.0_f32; 4usize],
7609        image_index: 0_i32,
7610        camera_id: 0_u8,
7611        capture_result: 0_i8,
7612        file_url: CharArray::new([0_u8; 205usize]),
7613    };
7614    #[cfg(feature = "arbitrary")]
7615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7616        use arbitrary::{Arbitrary, Unstructured};
7617        let mut buf = [0u8; 1024];
7618        rng.fill_bytes(&mut buf);
7619        let mut unstructured = Unstructured::new(&buf);
7620        Self::arbitrary(&mut unstructured).unwrap_or_default()
7621    }
7622}
7623impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7624    fn default() -> Self {
7625        Self::DEFAULT.clone()
7626    }
7627}
7628impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7629    type Message = MavMessage;
7630    const ID: u32 = 263u32;
7631    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7632    const EXTRA_CRC: u8 = 133u8;
7633    const ENCODED_LEN: usize = 255usize;
7634    fn deser(
7635        _version: MavlinkVersion,
7636        __input: &[u8],
7637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7638        let avail_len = __input.len();
7639        let mut payload_buf = [0; Self::ENCODED_LEN];
7640        let mut buf = if avail_len < Self::ENCODED_LEN {
7641            payload_buf[0..avail_len].copy_from_slice(__input);
7642            Bytes::new(&payload_buf)
7643        } else {
7644            Bytes::new(__input)
7645        };
7646        let mut __struct = Self::default();
7647        __struct.time_utc = buf.get_u64_le();
7648        __struct.time_boot_ms = buf.get_u32_le();
7649        __struct.lat = buf.get_i32_le();
7650        __struct.lon = buf.get_i32_le();
7651        __struct.alt = buf.get_i32_le();
7652        __struct.relative_alt = buf.get_i32_le();
7653        for v in &mut __struct.q {
7654            let val = buf.get_f32_le();
7655            *v = val;
7656        }
7657        __struct.image_index = buf.get_i32_le();
7658        __struct.camera_id = buf.get_u8();
7659        __struct.capture_result = buf.get_i8();
7660        let mut tmp = [0_u8; 205usize];
7661        for v in &mut tmp {
7662            *v = buf.get_u8();
7663        }
7664        __struct.file_url = CharArray::new(tmp);
7665        Ok(__struct)
7666    }
7667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7668        let mut __tmp = BytesMut::new(bytes);
7669        #[allow(clippy::absurd_extreme_comparisons)]
7670        #[allow(unused_comparisons)]
7671        if __tmp.remaining() < Self::ENCODED_LEN {
7672            panic!(
7673                "buffer is too small (need {} bytes, but got {})",
7674                Self::ENCODED_LEN,
7675                __tmp.remaining(),
7676            )
7677        }
7678        __tmp.put_u64_le(self.time_utc);
7679        __tmp.put_u32_le(self.time_boot_ms);
7680        __tmp.put_i32_le(self.lat);
7681        __tmp.put_i32_le(self.lon);
7682        __tmp.put_i32_le(self.alt);
7683        __tmp.put_i32_le(self.relative_alt);
7684        for val in &self.q {
7685            __tmp.put_f32_le(*val);
7686        }
7687        __tmp.put_i32_le(self.image_index);
7688        __tmp.put_u8(self.camera_id);
7689        __tmp.put_i8(self.capture_result);
7690        for val in &self.file_url {
7691            __tmp.put_u8(*val);
7692        }
7693        if matches!(version, MavlinkVersion::V2) {
7694            let len = __tmp.len();
7695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7696        } else {
7697            __tmp.len()
7698        }
7699    }
7700}
7701#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7702#[doc = ""]
7703#[doc = "ID: 259"]
7704#[derive(Debug, Clone, PartialEq)]
7705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7707#[cfg_attr(feature = "ts", derive(TS))]
7708#[cfg_attr(feature = "ts", ts(export))]
7709pub struct CAMERA_INFORMATION_DATA {
7710    #[doc = "Timestamp (time since system boot)."]
7711    pub time_boot_ms: u32,
7712    #[doc = "0xff). Use 0 if not known."]
7713    pub firmware_version: u32,
7714    #[doc = "Focal length. Use NaN if not known."]
7715    pub focal_length: f32,
7716    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7717    pub sensor_size_h: f32,
7718    #[doc = "Image sensor size vertical. Use NaN if not known."]
7719    pub sensor_size_v: f32,
7720    #[doc = "Bitmap of camera capability flags."]
7721    pub flags: CameraCapFlags,
7722    #[doc = "Horizontal image resolution. Use 0 if not known."]
7723    pub resolution_h: u16,
7724    #[doc = "Vertical image resolution. Use 0 if not known."]
7725    pub resolution_v: u16,
7726    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7727    pub cam_definition_version: u16,
7728    #[doc = "Name of the camera vendor"]
7729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7730    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7731    pub vendor_name: [u8; 32],
7732    #[doc = "Name of the camera model"]
7733    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7734    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7735    pub model_name: [u8; 32],
7736    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7737    pub lens_id: u8,
7738    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7739    #[cfg_attr(feature = "ts", ts(type = "string"))]
7740    pub cam_definition_uri: CharArray<140>,
7741    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7742    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7743    pub gimbal_device_id: u8,
7744    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7745    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7746    pub camera_device_id: u8,
7747}
7748impl CAMERA_INFORMATION_DATA {
7749    pub const ENCODED_LEN: usize = 237usize;
7750    pub const DEFAULT: Self = Self {
7751        time_boot_ms: 0_u32,
7752        firmware_version: 0_u32,
7753        focal_length: 0.0_f32,
7754        sensor_size_h: 0.0_f32,
7755        sensor_size_v: 0.0_f32,
7756        flags: CameraCapFlags::DEFAULT,
7757        resolution_h: 0_u16,
7758        resolution_v: 0_u16,
7759        cam_definition_version: 0_u16,
7760        vendor_name: [0_u8; 32usize],
7761        model_name: [0_u8; 32usize],
7762        lens_id: 0_u8,
7763        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7764        gimbal_device_id: 0_u8,
7765        camera_device_id: 0_u8,
7766    };
7767    #[cfg(feature = "arbitrary")]
7768    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7769        use arbitrary::{Arbitrary, Unstructured};
7770        let mut buf = [0u8; 1024];
7771        rng.fill_bytes(&mut buf);
7772        let mut unstructured = Unstructured::new(&buf);
7773        Self::arbitrary(&mut unstructured).unwrap_or_default()
7774    }
7775}
7776impl Default for CAMERA_INFORMATION_DATA {
7777    fn default() -> Self {
7778        Self::DEFAULT.clone()
7779    }
7780}
7781impl MessageData for CAMERA_INFORMATION_DATA {
7782    type Message = MavMessage;
7783    const ID: u32 = 259u32;
7784    const NAME: &'static str = "CAMERA_INFORMATION";
7785    const EXTRA_CRC: u8 = 92u8;
7786    const ENCODED_LEN: usize = 237usize;
7787    fn deser(
7788        _version: MavlinkVersion,
7789        __input: &[u8],
7790    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7791        let avail_len = __input.len();
7792        let mut payload_buf = [0; Self::ENCODED_LEN];
7793        let mut buf = if avail_len < Self::ENCODED_LEN {
7794            payload_buf[0..avail_len].copy_from_slice(__input);
7795            Bytes::new(&payload_buf)
7796        } else {
7797            Bytes::new(__input)
7798        };
7799        let mut __struct = Self::default();
7800        __struct.time_boot_ms = buf.get_u32_le();
7801        __struct.firmware_version = buf.get_u32_le();
7802        __struct.focal_length = buf.get_f32_le();
7803        __struct.sensor_size_h = buf.get_f32_le();
7804        __struct.sensor_size_v = buf.get_f32_le();
7805        let tmp = buf.get_u32_le();
7806        __struct.flags = CameraCapFlags::from_bits(tmp).ok_or(
7807            ::mavlink_core::error::ParserError::InvalidFlag {
7808                flag_type: "CameraCapFlags",
7809                value: tmp as u64,
7810            },
7811        )?;
7812        __struct.resolution_h = buf.get_u16_le();
7813        __struct.resolution_v = buf.get_u16_le();
7814        __struct.cam_definition_version = buf.get_u16_le();
7815        for v in &mut __struct.vendor_name {
7816            let val = buf.get_u8();
7817            *v = val;
7818        }
7819        for v in &mut __struct.model_name {
7820            let val = buf.get_u8();
7821            *v = val;
7822        }
7823        __struct.lens_id = buf.get_u8();
7824        let mut tmp = [0_u8; 140usize];
7825        for v in &mut tmp {
7826            *v = buf.get_u8();
7827        }
7828        __struct.cam_definition_uri = CharArray::new(tmp);
7829        __struct.gimbal_device_id = buf.get_u8();
7830        __struct.camera_device_id = buf.get_u8();
7831        Ok(__struct)
7832    }
7833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7834        let mut __tmp = BytesMut::new(bytes);
7835        #[allow(clippy::absurd_extreme_comparisons)]
7836        #[allow(unused_comparisons)]
7837        if __tmp.remaining() < Self::ENCODED_LEN {
7838            panic!(
7839                "buffer is too small (need {} bytes, but got {})",
7840                Self::ENCODED_LEN,
7841                __tmp.remaining(),
7842            )
7843        }
7844        __tmp.put_u32_le(self.time_boot_ms);
7845        __tmp.put_u32_le(self.firmware_version);
7846        __tmp.put_f32_le(self.focal_length);
7847        __tmp.put_f32_le(self.sensor_size_h);
7848        __tmp.put_f32_le(self.sensor_size_v);
7849        __tmp.put_u32_le(self.flags.bits());
7850        __tmp.put_u16_le(self.resolution_h);
7851        __tmp.put_u16_le(self.resolution_v);
7852        __tmp.put_u16_le(self.cam_definition_version);
7853        for val in &self.vendor_name {
7854            __tmp.put_u8(*val);
7855        }
7856        for val in &self.model_name {
7857            __tmp.put_u8(*val);
7858        }
7859        __tmp.put_u8(self.lens_id);
7860        for val in &self.cam_definition_uri {
7861            __tmp.put_u8(*val);
7862        }
7863        if matches!(version, MavlinkVersion::V2) {
7864            __tmp.put_u8(self.gimbal_device_id);
7865            __tmp.put_u8(self.camera_device_id);
7866            let len = __tmp.len();
7867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7868        } else {
7869            __tmp.len()
7870        }
7871    }
7872}
7873#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7874#[doc = ""]
7875#[doc = "ID: 260"]
7876#[derive(Debug, Clone, PartialEq)]
7877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7879#[cfg_attr(feature = "ts", derive(TS))]
7880#[cfg_attr(feature = "ts", ts(export))]
7881pub struct CAMERA_SETTINGS_DATA {
7882    #[doc = "Timestamp (time since system boot)."]
7883    pub time_boot_ms: u32,
7884    #[doc = "Camera mode"]
7885    pub mode_id: CameraMode,
7886    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7888    pub zoomLevel: f32,
7889    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7891    pub focusLevel: f32,
7892    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7894    pub camera_device_id: u8,
7895}
7896impl CAMERA_SETTINGS_DATA {
7897    pub const ENCODED_LEN: usize = 14usize;
7898    pub const DEFAULT: Self = Self {
7899        time_boot_ms: 0_u32,
7900        mode_id: CameraMode::DEFAULT,
7901        zoomLevel: 0.0_f32,
7902        focusLevel: 0.0_f32,
7903        camera_device_id: 0_u8,
7904    };
7905    #[cfg(feature = "arbitrary")]
7906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7907        use arbitrary::{Arbitrary, Unstructured};
7908        let mut buf = [0u8; 1024];
7909        rng.fill_bytes(&mut buf);
7910        let mut unstructured = Unstructured::new(&buf);
7911        Self::arbitrary(&mut unstructured).unwrap_or_default()
7912    }
7913}
7914impl Default for CAMERA_SETTINGS_DATA {
7915    fn default() -> Self {
7916        Self::DEFAULT.clone()
7917    }
7918}
7919impl MessageData for CAMERA_SETTINGS_DATA {
7920    type Message = MavMessage;
7921    const ID: u32 = 260u32;
7922    const NAME: &'static str = "CAMERA_SETTINGS";
7923    const EXTRA_CRC: u8 = 146u8;
7924    const ENCODED_LEN: usize = 14usize;
7925    fn deser(
7926        _version: MavlinkVersion,
7927        __input: &[u8],
7928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7929        let avail_len = __input.len();
7930        let mut payload_buf = [0; Self::ENCODED_LEN];
7931        let mut buf = if avail_len < Self::ENCODED_LEN {
7932            payload_buf[0..avail_len].copy_from_slice(__input);
7933            Bytes::new(&payload_buf)
7934        } else {
7935            Bytes::new(__input)
7936        };
7937        let mut __struct = Self::default();
7938        __struct.time_boot_ms = buf.get_u32_le();
7939        let tmp = buf.get_u8();
7940        __struct.mode_id =
7941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7942                enum_type: "CameraMode",
7943                value: tmp as u64,
7944            })?;
7945        __struct.zoomLevel = buf.get_f32_le();
7946        __struct.focusLevel = buf.get_f32_le();
7947        __struct.camera_device_id = buf.get_u8();
7948        Ok(__struct)
7949    }
7950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7951        let mut __tmp = BytesMut::new(bytes);
7952        #[allow(clippy::absurd_extreme_comparisons)]
7953        #[allow(unused_comparisons)]
7954        if __tmp.remaining() < Self::ENCODED_LEN {
7955            panic!(
7956                "buffer is too small (need {} bytes, but got {})",
7957                Self::ENCODED_LEN,
7958                __tmp.remaining(),
7959            )
7960        }
7961        __tmp.put_u32_le(self.time_boot_ms);
7962        __tmp.put_u8(self.mode_id as u8);
7963        if matches!(version, MavlinkVersion::V2) {
7964            __tmp.put_f32_le(self.zoomLevel);
7965            __tmp.put_f32_le(self.focusLevel);
7966            __tmp.put_u8(self.camera_device_id);
7967            let len = __tmp.len();
7968            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7969        } else {
7970            __tmp.len()
7971        }
7972    }
7973}
7974#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7975#[doc = ""]
7976#[doc = "ID: 277"]
7977#[derive(Debug, Clone, PartialEq)]
7978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7980#[cfg_attr(feature = "ts", derive(TS))]
7981#[cfg_attr(feature = "ts", ts(export))]
7982pub struct CAMERA_THERMAL_RANGE_DATA {
7983    #[doc = "Timestamp (time since system boot)."]
7984    pub time_boot_ms: u32,
7985    #[doc = "Temperature max."]
7986    pub max: f32,
7987    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7988    pub max_point_x: f32,
7989    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7990    pub max_point_y: f32,
7991    #[doc = "Temperature min."]
7992    pub min: f32,
7993    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7994    pub min_point_x: f32,
7995    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7996    pub min_point_y: f32,
7997    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7998    pub stream_id: u8,
7999    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8000    pub camera_device_id: u8,
8001}
8002impl CAMERA_THERMAL_RANGE_DATA {
8003    pub const ENCODED_LEN: usize = 30usize;
8004    pub const DEFAULT: Self = Self {
8005        time_boot_ms: 0_u32,
8006        max: 0.0_f32,
8007        max_point_x: 0.0_f32,
8008        max_point_y: 0.0_f32,
8009        min: 0.0_f32,
8010        min_point_x: 0.0_f32,
8011        min_point_y: 0.0_f32,
8012        stream_id: 0_u8,
8013        camera_device_id: 0_u8,
8014    };
8015    #[cfg(feature = "arbitrary")]
8016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8017        use arbitrary::{Arbitrary, Unstructured};
8018        let mut buf = [0u8; 1024];
8019        rng.fill_bytes(&mut buf);
8020        let mut unstructured = Unstructured::new(&buf);
8021        Self::arbitrary(&mut unstructured).unwrap_or_default()
8022    }
8023}
8024impl Default for CAMERA_THERMAL_RANGE_DATA {
8025    fn default() -> Self {
8026        Self::DEFAULT.clone()
8027    }
8028}
8029impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8030    type Message = MavMessage;
8031    const ID: u32 = 277u32;
8032    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8033    const EXTRA_CRC: u8 = 62u8;
8034    const ENCODED_LEN: usize = 30usize;
8035    fn deser(
8036        _version: MavlinkVersion,
8037        __input: &[u8],
8038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8039        let avail_len = __input.len();
8040        let mut payload_buf = [0; Self::ENCODED_LEN];
8041        let mut buf = if avail_len < Self::ENCODED_LEN {
8042            payload_buf[0..avail_len].copy_from_slice(__input);
8043            Bytes::new(&payload_buf)
8044        } else {
8045            Bytes::new(__input)
8046        };
8047        let mut __struct = Self::default();
8048        __struct.time_boot_ms = buf.get_u32_le();
8049        __struct.max = buf.get_f32_le();
8050        __struct.max_point_x = buf.get_f32_le();
8051        __struct.max_point_y = buf.get_f32_le();
8052        __struct.min = buf.get_f32_le();
8053        __struct.min_point_x = buf.get_f32_le();
8054        __struct.min_point_y = buf.get_f32_le();
8055        __struct.stream_id = buf.get_u8();
8056        __struct.camera_device_id = buf.get_u8();
8057        Ok(__struct)
8058    }
8059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8060        let mut __tmp = BytesMut::new(bytes);
8061        #[allow(clippy::absurd_extreme_comparisons)]
8062        #[allow(unused_comparisons)]
8063        if __tmp.remaining() < Self::ENCODED_LEN {
8064            panic!(
8065                "buffer is too small (need {} bytes, but got {})",
8066                Self::ENCODED_LEN,
8067                __tmp.remaining(),
8068            )
8069        }
8070        __tmp.put_u32_le(self.time_boot_ms);
8071        __tmp.put_f32_le(self.max);
8072        __tmp.put_f32_le(self.max_point_x);
8073        __tmp.put_f32_le(self.max_point_y);
8074        __tmp.put_f32_le(self.min);
8075        __tmp.put_f32_le(self.min_point_x);
8076        __tmp.put_f32_le(self.min_point_y);
8077        __tmp.put_u8(self.stream_id);
8078        __tmp.put_u8(self.camera_device_id);
8079        if matches!(version, MavlinkVersion::V2) {
8080            let len = __tmp.len();
8081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8082        } else {
8083            __tmp.len()
8084        }
8085    }
8086}
8087#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8088#[doc = ""]
8089#[doc = "ID: 276"]
8090#[derive(Debug, Clone, PartialEq)]
8091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8093#[cfg_attr(feature = "ts", derive(TS))]
8094#[cfg_attr(feature = "ts", ts(export))]
8095pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8096    #[doc = "Latitude of tracked object"]
8097    pub lat: i32,
8098    #[doc = "Longitude of tracked object"]
8099    pub lon: i32,
8100    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8101    pub alt: f32,
8102    #[doc = "Horizontal accuracy. NAN if unknown"]
8103    pub h_acc: f32,
8104    #[doc = "Vertical accuracy. NAN if unknown"]
8105    pub v_acc: f32,
8106    #[doc = "North velocity of tracked object. NAN if unknown"]
8107    pub vel_n: f32,
8108    #[doc = "East velocity of tracked object. NAN if unknown"]
8109    pub vel_e: f32,
8110    #[doc = "Down velocity of tracked object. NAN if unknown"]
8111    pub vel_d: f32,
8112    #[doc = "Velocity accuracy. NAN if unknown"]
8113    pub vel_acc: f32,
8114    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8115    pub dist: f32,
8116    #[doc = "Heading in radians, in NED. NAN if unknown"]
8117    pub hdg: f32,
8118    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8119    pub hdg_acc: f32,
8120    #[doc = "Current tracking status"]
8121    pub tracking_status: CameraTrackingStatusFlags,
8122    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8124    pub camera_device_id: u8,
8125}
8126impl CAMERA_TRACKING_GEO_STATUS_DATA {
8127    pub const ENCODED_LEN: usize = 50usize;
8128    pub const DEFAULT: Self = Self {
8129        lat: 0_i32,
8130        lon: 0_i32,
8131        alt: 0.0_f32,
8132        h_acc: 0.0_f32,
8133        v_acc: 0.0_f32,
8134        vel_n: 0.0_f32,
8135        vel_e: 0.0_f32,
8136        vel_d: 0.0_f32,
8137        vel_acc: 0.0_f32,
8138        dist: 0.0_f32,
8139        hdg: 0.0_f32,
8140        hdg_acc: 0.0_f32,
8141        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8142        camera_device_id: 0_u8,
8143    };
8144    #[cfg(feature = "arbitrary")]
8145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8146        use arbitrary::{Arbitrary, Unstructured};
8147        let mut buf = [0u8; 1024];
8148        rng.fill_bytes(&mut buf);
8149        let mut unstructured = Unstructured::new(&buf);
8150        Self::arbitrary(&mut unstructured).unwrap_or_default()
8151    }
8152}
8153impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8154    fn default() -> Self {
8155        Self::DEFAULT.clone()
8156    }
8157}
8158impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8159    type Message = MavMessage;
8160    const ID: u32 = 276u32;
8161    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8162    const EXTRA_CRC: u8 = 18u8;
8163    const ENCODED_LEN: usize = 50usize;
8164    fn deser(
8165        _version: MavlinkVersion,
8166        __input: &[u8],
8167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8168        let avail_len = __input.len();
8169        let mut payload_buf = [0; Self::ENCODED_LEN];
8170        let mut buf = if avail_len < Self::ENCODED_LEN {
8171            payload_buf[0..avail_len].copy_from_slice(__input);
8172            Bytes::new(&payload_buf)
8173        } else {
8174            Bytes::new(__input)
8175        };
8176        let mut __struct = Self::default();
8177        __struct.lat = buf.get_i32_le();
8178        __struct.lon = buf.get_i32_le();
8179        __struct.alt = buf.get_f32_le();
8180        __struct.h_acc = buf.get_f32_le();
8181        __struct.v_acc = buf.get_f32_le();
8182        __struct.vel_n = buf.get_f32_le();
8183        __struct.vel_e = buf.get_f32_le();
8184        __struct.vel_d = buf.get_f32_le();
8185        __struct.vel_acc = buf.get_f32_le();
8186        __struct.dist = buf.get_f32_le();
8187        __struct.hdg = buf.get_f32_le();
8188        __struct.hdg_acc = buf.get_f32_le();
8189        let tmp = buf.get_u8();
8190        __struct.tracking_status =
8191            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8192                enum_type: "CameraTrackingStatusFlags",
8193                value: tmp as u64,
8194            })?;
8195        __struct.camera_device_id = buf.get_u8();
8196        Ok(__struct)
8197    }
8198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8199        let mut __tmp = BytesMut::new(bytes);
8200        #[allow(clippy::absurd_extreme_comparisons)]
8201        #[allow(unused_comparisons)]
8202        if __tmp.remaining() < Self::ENCODED_LEN {
8203            panic!(
8204                "buffer is too small (need {} bytes, but got {})",
8205                Self::ENCODED_LEN,
8206                __tmp.remaining(),
8207            )
8208        }
8209        __tmp.put_i32_le(self.lat);
8210        __tmp.put_i32_le(self.lon);
8211        __tmp.put_f32_le(self.alt);
8212        __tmp.put_f32_le(self.h_acc);
8213        __tmp.put_f32_le(self.v_acc);
8214        __tmp.put_f32_le(self.vel_n);
8215        __tmp.put_f32_le(self.vel_e);
8216        __tmp.put_f32_le(self.vel_d);
8217        __tmp.put_f32_le(self.vel_acc);
8218        __tmp.put_f32_le(self.dist);
8219        __tmp.put_f32_le(self.hdg);
8220        __tmp.put_f32_le(self.hdg_acc);
8221        __tmp.put_u8(self.tracking_status as u8);
8222        if matches!(version, MavlinkVersion::V2) {
8223            __tmp.put_u8(self.camera_device_id);
8224            let len = __tmp.len();
8225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8226        } else {
8227            __tmp.len()
8228        }
8229    }
8230}
8231#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8232#[doc = ""]
8233#[doc = "ID: 275"]
8234#[derive(Debug, Clone, PartialEq)]
8235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8237#[cfg_attr(feature = "ts", derive(TS))]
8238#[cfg_attr(feature = "ts", ts(export))]
8239pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8240    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8241    pub point_x: f32,
8242    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8243    pub point_y: f32,
8244    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8245    pub radius: f32,
8246    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8247    pub rec_top_x: f32,
8248    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8249    pub rec_top_y: f32,
8250    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8251    pub rec_bottom_x: f32,
8252    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8253    pub rec_bottom_y: f32,
8254    #[doc = "Current tracking status"]
8255    pub tracking_status: CameraTrackingStatusFlags,
8256    #[doc = "Current tracking mode"]
8257    pub tracking_mode: CameraTrackingMode,
8258    #[doc = "Defines location of target data"]
8259    pub target_data: CameraTrackingTargetData,
8260    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8261    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8262    pub camera_device_id: u8,
8263}
8264impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8265    pub const ENCODED_LEN: usize = 32usize;
8266    pub const DEFAULT: Self = Self {
8267        point_x: 0.0_f32,
8268        point_y: 0.0_f32,
8269        radius: 0.0_f32,
8270        rec_top_x: 0.0_f32,
8271        rec_top_y: 0.0_f32,
8272        rec_bottom_x: 0.0_f32,
8273        rec_bottom_y: 0.0_f32,
8274        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8275        tracking_mode: CameraTrackingMode::DEFAULT,
8276        target_data: CameraTrackingTargetData::DEFAULT,
8277        camera_device_id: 0_u8,
8278    };
8279    #[cfg(feature = "arbitrary")]
8280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8281        use arbitrary::{Arbitrary, Unstructured};
8282        let mut buf = [0u8; 1024];
8283        rng.fill_bytes(&mut buf);
8284        let mut unstructured = Unstructured::new(&buf);
8285        Self::arbitrary(&mut unstructured).unwrap_or_default()
8286    }
8287}
8288impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8289    fn default() -> Self {
8290        Self::DEFAULT.clone()
8291    }
8292}
8293impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8294    type Message = MavMessage;
8295    const ID: u32 = 275u32;
8296    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8297    const EXTRA_CRC: u8 = 126u8;
8298    const ENCODED_LEN: usize = 32usize;
8299    fn deser(
8300        _version: MavlinkVersion,
8301        __input: &[u8],
8302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8303        let avail_len = __input.len();
8304        let mut payload_buf = [0; Self::ENCODED_LEN];
8305        let mut buf = if avail_len < Self::ENCODED_LEN {
8306            payload_buf[0..avail_len].copy_from_slice(__input);
8307            Bytes::new(&payload_buf)
8308        } else {
8309            Bytes::new(__input)
8310        };
8311        let mut __struct = Self::default();
8312        __struct.point_x = buf.get_f32_le();
8313        __struct.point_y = buf.get_f32_le();
8314        __struct.radius = buf.get_f32_le();
8315        __struct.rec_top_x = buf.get_f32_le();
8316        __struct.rec_top_y = buf.get_f32_le();
8317        __struct.rec_bottom_x = buf.get_f32_le();
8318        __struct.rec_bottom_y = buf.get_f32_le();
8319        let tmp = buf.get_u8();
8320        __struct.tracking_status =
8321            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8322                enum_type: "CameraTrackingStatusFlags",
8323                value: tmp as u64,
8324            })?;
8325        let tmp = buf.get_u8();
8326        __struct.tracking_mode =
8327            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8328                enum_type: "CameraTrackingMode",
8329                value: tmp as u64,
8330            })?;
8331        let tmp = buf.get_u8();
8332        __struct.target_data = CameraTrackingTargetData::from_bits(tmp).ok_or(
8333            ::mavlink_core::error::ParserError::InvalidFlag {
8334                flag_type: "CameraTrackingTargetData",
8335                value: tmp as u64,
8336            },
8337        )?;
8338        __struct.camera_device_id = buf.get_u8();
8339        Ok(__struct)
8340    }
8341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8342        let mut __tmp = BytesMut::new(bytes);
8343        #[allow(clippy::absurd_extreme_comparisons)]
8344        #[allow(unused_comparisons)]
8345        if __tmp.remaining() < Self::ENCODED_LEN {
8346            panic!(
8347                "buffer is too small (need {} bytes, but got {})",
8348                Self::ENCODED_LEN,
8349                __tmp.remaining(),
8350            )
8351        }
8352        __tmp.put_f32_le(self.point_x);
8353        __tmp.put_f32_le(self.point_y);
8354        __tmp.put_f32_le(self.radius);
8355        __tmp.put_f32_le(self.rec_top_x);
8356        __tmp.put_f32_le(self.rec_top_y);
8357        __tmp.put_f32_le(self.rec_bottom_x);
8358        __tmp.put_f32_le(self.rec_bottom_y);
8359        __tmp.put_u8(self.tracking_status as u8);
8360        __tmp.put_u8(self.tracking_mode as u8);
8361        __tmp.put_u8(self.target_data.bits());
8362        if matches!(version, MavlinkVersion::V2) {
8363            __tmp.put_u8(self.camera_device_id);
8364            let len = __tmp.len();
8365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8366        } else {
8367            __tmp.len()
8368        }
8369    }
8370}
8371#[doc = "Camera-IMU triggering and synchronisation message."]
8372#[doc = ""]
8373#[doc = "ID: 112"]
8374#[derive(Debug, Clone, PartialEq)]
8375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8377#[cfg_attr(feature = "ts", derive(TS))]
8378#[cfg_attr(feature = "ts", ts(export))]
8379pub struct CAMERA_TRIGGER_DATA {
8380    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8381    pub time_usec: u64,
8382    #[doc = "Image frame sequence"]
8383    pub seq: u32,
8384}
8385impl CAMERA_TRIGGER_DATA {
8386    pub const ENCODED_LEN: usize = 12usize;
8387    pub const DEFAULT: Self = Self {
8388        time_usec: 0_u64,
8389        seq: 0_u32,
8390    };
8391    #[cfg(feature = "arbitrary")]
8392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8393        use arbitrary::{Arbitrary, Unstructured};
8394        let mut buf = [0u8; 1024];
8395        rng.fill_bytes(&mut buf);
8396        let mut unstructured = Unstructured::new(&buf);
8397        Self::arbitrary(&mut unstructured).unwrap_or_default()
8398    }
8399}
8400impl Default for CAMERA_TRIGGER_DATA {
8401    fn default() -> Self {
8402        Self::DEFAULT.clone()
8403    }
8404}
8405impl MessageData for CAMERA_TRIGGER_DATA {
8406    type Message = MavMessage;
8407    const ID: u32 = 112u32;
8408    const NAME: &'static str = "CAMERA_TRIGGER";
8409    const EXTRA_CRC: u8 = 174u8;
8410    const ENCODED_LEN: usize = 12usize;
8411    fn deser(
8412        _version: MavlinkVersion,
8413        __input: &[u8],
8414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8415        let avail_len = __input.len();
8416        let mut payload_buf = [0; Self::ENCODED_LEN];
8417        let mut buf = if avail_len < Self::ENCODED_LEN {
8418            payload_buf[0..avail_len].copy_from_slice(__input);
8419            Bytes::new(&payload_buf)
8420        } else {
8421            Bytes::new(__input)
8422        };
8423        let mut __struct = Self::default();
8424        __struct.time_usec = buf.get_u64_le();
8425        __struct.seq = buf.get_u32_le();
8426        Ok(__struct)
8427    }
8428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8429        let mut __tmp = BytesMut::new(bytes);
8430        #[allow(clippy::absurd_extreme_comparisons)]
8431        #[allow(unused_comparisons)]
8432        if __tmp.remaining() < Self::ENCODED_LEN {
8433            panic!(
8434                "buffer is too small (need {} bytes, but got {})",
8435                Self::ENCODED_LEN,
8436                __tmp.remaining(),
8437            )
8438        }
8439        __tmp.put_u64_le(self.time_usec);
8440        __tmp.put_u32_le(self.seq);
8441        if matches!(version, MavlinkVersion::V2) {
8442            let len = __tmp.len();
8443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8444        } else {
8445            __tmp.len()
8446        }
8447    }
8448}
8449#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8450#[doc = ""]
8451#[doc = "ID: 387"]
8452#[derive(Debug, Clone, PartialEq)]
8453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8455#[cfg_attr(feature = "ts", derive(TS))]
8456#[cfg_attr(feature = "ts", ts(export))]
8457pub struct CANFD_FRAME_DATA {
8458    #[doc = "Frame ID"]
8459    pub id: u32,
8460    #[doc = "System ID."]
8461    pub target_system: u8,
8462    #[doc = "Component ID."]
8463    pub target_component: u8,
8464    #[doc = "bus number"]
8465    pub bus: u8,
8466    #[doc = "Frame length"]
8467    pub len: u8,
8468    #[doc = "Frame data"]
8469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8471    pub data: [u8; 64],
8472}
8473impl CANFD_FRAME_DATA {
8474    pub const ENCODED_LEN: usize = 72usize;
8475    pub const DEFAULT: Self = Self {
8476        id: 0_u32,
8477        target_system: 0_u8,
8478        target_component: 0_u8,
8479        bus: 0_u8,
8480        len: 0_u8,
8481        data: [0_u8; 64usize],
8482    };
8483    #[cfg(feature = "arbitrary")]
8484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8485        use arbitrary::{Arbitrary, Unstructured};
8486        let mut buf = [0u8; 1024];
8487        rng.fill_bytes(&mut buf);
8488        let mut unstructured = Unstructured::new(&buf);
8489        Self::arbitrary(&mut unstructured).unwrap_or_default()
8490    }
8491}
8492impl Default for CANFD_FRAME_DATA {
8493    fn default() -> Self {
8494        Self::DEFAULT.clone()
8495    }
8496}
8497impl MessageData for CANFD_FRAME_DATA {
8498    type Message = MavMessage;
8499    const ID: u32 = 387u32;
8500    const NAME: &'static str = "CANFD_FRAME";
8501    const EXTRA_CRC: u8 = 4u8;
8502    const ENCODED_LEN: usize = 72usize;
8503    fn deser(
8504        _version: MavlinkVersion,
8505        __input: &[u8],
8506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8507        let avail_len = __input.len();
8508        let mut payload_buf = [0; Self::ENCODED_LEN];
8509        let mut buf = if avail_len < Self::ENCODED_LEN {
8510            payload_buf[0..avail_len].copy_from_slice(__input);
8511            Bytes::new(&payload_buf)
8512        } else {
8513            Bytes::new(__input)
8514        };
8515        let mut __struct = Self::default();
8516        __struct.id = buf.get_u32_le();
8517        __struct.target_system = buf.get_u8();
8518        __struct.target_component = buf.get_u8();
8519        __struct.bus = buf.get_u8();
8520        __struct.len = buf.get_u8();
8521        for v in &mut __struct.data {
8522            let val = buf.get_u8();
8523            *v = val;
8524        }
8525        Ok(__struct)
8526    }
8527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8528        let mut __tmp = BytesMut::new(bytes);
8529        #[allow(clippy::absurd_extreme_comparisons)]
8530        #[allow(unused_comparisons)]
8531        if __tmp.remaining() < Self::ENCODED_LEN {
8532            panic!(
8533                "buffer is too small (need {} bytes, but got {})",
8534                Self::ENCODED_LEN,
8535                __tmp.remaining(),
8536            )
8537        }
8538        __tmp.put_u32_le(self.id);
8539        __tmp.put_u8(self.target_system);
8540        __tmp.put_u8(self.target_component);
8541        __tmp.put_u8(self.bus);
8542        __tmp.put_u8(self.len);
8543        for val in &self.data {
8544            __tmp.put_u8(*val);
8545        }
8546        if matches!(version, MavlinkVersion::V2) {
8547            let len = __tmp.len();
8548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8549        } else {
8550            __tmp.len()
8551        }
8552    }
8553}
8554#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8555#[doc = ""]
8556#[doc = "ID: 388"]
8557#[derive(Debug, Clone, PartialEq)]
8558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8560#[cfg_attr(feature = "ts", derive(TS))]
8561#[cfg_attr(feature = "ts", ts(export))]
8562pub struct CAN_FILTER_MODIFY_DATA {
8563    #[doc = "filter IDs, length num_ids"]
8564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8565    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8566    pub ids: [u16; 16],
8567    #[doc = "System ID."]
8568    pub target_system: u8,
8569    #[doc = "Component ID."]
8570    pub target_component: u8,
8571    #[doc = "bus number"]
8572    pub bus: u8,
8573    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8574    pub operation: CanFilterOp,
8575    #[doc = "number of IDs in filter list"]
8576    pub num_ids: u8,
8577}
8578impl CAN_FILTER_MODIFY_DATA {
8579    pub const ENCODED_LEN: usize = 37usize;
8580    pub const DEFAULT: Self = Self {
8581        ids: [0_u16; 16usize],
8582        target_system: 0_u8,
8583        target_component: 0_u8,
8584        bus: 0_u8,
8585        operation: CanFilterOp::DEFAULT,
8586        num_ids: 0_u8,
8587    };
8588    #[cfg(feature = "arbitrary")]
8589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8590        use arbitrary::{Arbitrary, Unstructured};
8591        let mut buf = [0u8; 1024];
8592        rng.fill_bytes(&mut buf);
8593        let mut unstructured = Unstructured::new(&buf);
8594        Self::arbitrary(&mut unstructured).unwrap_or_default()
8595    }
8596}
8597impl Default for CAN_FILTER_MODIFY_DATA {
8598    fn default() -> Self {
8599        Self::DEFAULT.clone()
8600    }
8601}
8602impl MessageData for CAN_FILTER_MODIFY_DATA {
8603    type Message = MavMessage;
8604    const ID: u32 = 388u32;
8605    const NAME: &'static str = "CAN_FILTER_MODIFY";
8606    const EXTRA_CRC: u8 = 8u8;
8607    const ENCODED_LEN: usize = 37usize;
8608    fn deser(
8609        _version: MavlinkVersion,
8610        __input: &[u8],
8611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8612        let avail_len = __input.len();
8613        let mut payload_buf = [0; Self::ENCODED_LEN];
8614        let mut buf = if avail_len < Self::ENCODED_LEN {
8615            payload_buf[0..avail_len].copy_from_slice(__input);
8616            Bytes::new(&payload_buf)
8617        } else {
8618            Bytes::new(__input)
8619        };
8620        let mut __struct = Self::default();
8621        for v in &mut __struct.ids {
8622            let val = buf.get_u16_le();
8623            *v = val;
8624        }
8625        __struct.target_system = buf.get_u8();
8626        __struct.target_component = buf.get_u8();
8627        __struct.bus = buf.get_u8();
8628        let tmp = buf.get_u8();
8629        __struct.operation =
8630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8631                enum_type: "CanFilterOp",
8632                value: tmp as u64,
8633            })?;
8634        __struct.num_ids = buf.get_u8();
8635        Ok(__struct)
8636    }
8637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8638        let mut __tmp = BytesMut::new(bytes);
8639        #[allow(clippy::absurd_extreme_comparisons)]
8640        #[allow(unused_comparisons)]
8641        if __tmp.remaining() < Self::ENCODED_LEN {
8642            panic!(
8643                "buffer is too small (need {} bytes, but got {})",
8644                Self::ENCODED_LEN,
8645                __tmp.remaining(),
8646            )
8647        }
8648        for val in &self.ids {
8649            __tmp.put_u16_le(*val);
8650        }
8651        __tmp.put_u8(self.target_system);
8652        __tmp.put_u8(self.target_component);
8653        __tmp.put_u8(self.bus);
8654        __tmp.put_u8(self.operation as u8);
8655        __tmp.put_u8(self.num_ids);
8656        if matches!(version, MavlinkVersion::V2) {
8657            let len = __tmp.len();
8658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8659        } else {
8660            __tmp.len()
8661        }
8662    }
8663}
8664#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8665#[doc = ""]
8666#[doc = "ID: 386"]
8667#[derive(Debug, Clone, PartialEq)]
8668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8670#[cfg_attr(feature = "ts", derive(TS))]
8671#[cfg_attr(feature = "ts", ts(export))]
8672pub struct CAN_FRAME_DATA {
8673    #[doc = "Frame ID"]
8674    pub id: u32,
8675    #[doc = "System ID."]
8676    pub target_system: u8,
8677    #[doc = "Component ID."]
8678    pub target_component: u8,
8679    #[doc = "Bus number"]
8680    pub bus: u8,
8681    #[doc = "Frame length"]
8682    pub len: u8,
8683    #[doc = "Frame data"]
8684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8686    pub data: [u8; 8],
8687}
8688impl CAN_FRAME_DATA {
8689    pub const ENCODED_LEN: usize = 16usize;
8690    pub const DEFAULT: Self = Self {
8691        id: 0_u32,
8692        target_system: 0_u8,
8693        target_component: 0_u8,
8694        bus: 0_u8,
8695        len: 0_u8,
8696        data: [0_u8; 8usize],
8697    };
8698    #[cfg(feature = "arbitrary")]
8699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8700        use arbitrary::{Arbitrary, Unstructured};
8701        let mut buf = [0u8; 1024];
8702        rng.fill_bytes(&mut buf);
8703        let mut unstructured = Unstructured::new(&buf);
8704        Self::arbitrary(&mut unstructured).unwrap_or_default()
8705    }
8706}
8707impl Default for CAN_FRAME_DATA {
8708    fn default() -> Self {
8709        Self::DEFAULT.clone()
8710    }
8711}
8712impl MessageData for CAN_FRAME_DATA {
8713    type Message = MavMessage;
8714    const ID: u32 = 386u32;
8715    const NAME: &'static str = "CAN_FRAME";
8716    const EXTRA_CRC: u8 = 132u8;
8717    const ENCODED_LEN: usize = 16usize;
8718    fn deser(
8719        _version: MavlinkVersion,
8720        __input: &[u8],
8721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8722        let avail_len = __input.len();
8723        let mut payload_buf = [0; Self::ENCODED_LEN];
8724        let mut buf = if avail_len < Self::ENCODED_LEN {
8725            payload_buf[0..avail_len].copy_from_slice(__input);
8726            Bytes::new(&payload_buf)
8727        } else {
8728            Bytes::new(__input)
8729        };
8730        let mut __struct = Self::default();
8731        __struct.id = buf.get_u32_le();
8732        __struct.target_system = buf.get_u8();
8733        __struct.target_component = buf.get_u8();
8734        __struct.bus = buf.get_u8();
8735        __struct.len = buf.get_u8();
8736        for v in &mut __struct.data {
8737            let val = buf.get_u8();
8738            *v = val;
8739        }
8740        Ok(__struct)
8741    }
8742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8743        let mut __tmp = BytesMut::new(bytes);
8744        #[allow(clippy::absurd_extreme_comparisons)]
8745        #[allow(unused_comparisons)]
8746        if __tmp.remaining() < Self::ENCODED_LEN {
8747            panic!(
8748                "buffer is too small (need {} bytes, but got {})",
8749                Self::ENCODED_LEN,
8750                __tmp.remaining(),
8751            )
8752        }
8753        __tmp.put_u32_le(self.id);
8754        __tmp.put_u8(self.target_system);
8755        __tmp.put_u8(self.target_component);
8756        __tmp.put_u8(self.bus);
8757        __tmp.put_u8(self.len);
8758        for val in &self.data {
8759            __tmp.put_u8(*val);
8760        }
8761        if matches!(version, MavlinkVersion::V2) {
8762            let len = __tmp.len();
8763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8764        } else {
8765            __tmp.len()
8766        }
8767    }
8768}
8769#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8770#[doc = ""]
8771#[doc = "ID: 336"]
8772#[derive(Debug, Clone, PartialEq)]
8773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8775#[cfg_attr(feature = "ts", derive(TS))]
8776#[cfg_attr(feature = "ts", ts(export))]
8777pub struct CELLULAR_CONFIG_DATA {
8778    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8779    pub enable_lte: u8,
8780    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8781    pub enable_pin: u8,
8782    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8783    #[cfg_attr(feature = "ts", ts(type = "string"))]
8784    pub pin: CharArray<16>,
8785    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8786    #[cfg_attr(feature = "ts", ts(type = "string"))]
8787    pub new_pin: CharArray<16>,
8788    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8789    #[cfg_attr(feature = "ts", ts(type = "string"))]
8790    pub apn: CharArray<32>,
8791    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8792    #[cfg_attr(feature = "ts", ts(type = "string"))]
8793    pub puk: CharArray<16>,
8794    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8795    pub roaming: u8,
8796    #[doc = "Message acceptance response (sent back to GS)."]
8797    pub response: CellularConfigResponse,
8798}
8799impl CELLULAR_CONFIG_DATA {
8800    pub const ENCODED_LEN: usize = 84usize;
8801    pub const DEFAULT: Self = Self {
8802        enable_lte: 0_u8,
8803        enable_pin: 0_u8,
8804        pin: CharArray::new([0_u8; 16usize]),
8805        new_pin: CharArray::new([0_u8; 16usize]),
8806        apn: CharArray::new([0_u8; 32usize]),
8807        puk: CharArray::new([0_u8; 16usize]),
8808        roaming: 0_u8,
8809        response: CellularConfigResponse::DEFAULT,
8810    };
8811    #[cfg(feature = "arbitrary")]
8812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8813        use arbitrary::{Arbitrary, Unstructured};
8814        let mut buf = [0u8; 1024];
8815        rng.fill_bytes(&mut buf);
8816        let mut unstructured = Unstructured::new(&buf);
8817        Self::arbitrary(&mut unstructured).unwrap_or_default()
8818    }
8819}
8820impl Default for CELLULAR_CONFIG_DATA {
8821    fn default() -> Self {
8822        Self::DEFAULT.clone()
8823    }
8824}
8825impl MessageData for CELLULAR_CONFIG_DATA {
8826    type Message = MavMessage;
8827    const ID: u32 = 336u32;
8828    const NAME: &'static str = "CELLULAR_CONFIG";
8829    const EXTRA_CRC: u8 = 245u8;
8830    const ENCODED_LEN: usize = 84usize;
8831    fn deser(
8832        _version: MavlinkVersion,
8833        __input: &[u8],
8834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8835        let avail_len = __input.len();
8836        let mut payload_buf = [0; Self::ENCODED_LEN];
8837        let mut buf = if avail_len < Self::ENCODED_LEN {
8838            payload_buf[0..avail_len].copy_from_slice(__input);
8839            Bytes::new(&payload_buf)
8840        } else {
8841            Bytes::new(__input)
8842        };
8843        let mut __struct = Self::default();
8844        __struct.enable_lte = buf.get_u8();
8845        __struct.enable_pin = buf.get_u8();
8846        let mut tmp = [0_u8; 16usize];
8847        for v in &mut tmp {
8848            *v = buf.get_u8();
8849        }
8850        __struct.pin = CharArray::new(tmp);
8851        let mut tmp = [0_u8; 16usize];
8852        for v in &mut tmp {
8853            *v = buf.get_u8();
8854        }
8855        __struct.new_pin = CharArray::new(tmp);
8856        let mut tmp = [0_u8; 32usize];
8857        for v in &mut tmp {
8858            *v = buf.get_u8();
8859        }
8860        __struct.apn = CharArray::new(tmp);
8861        let mut tmp = [0_u8; 16usize];
8862        for v in &mut tmp {
8863            *v = buf.get_u8();
8864        }
8865        __struct.puk = CharArray::new(tmp);
8866        __struct.roaming = buf.get_u8();
8867        let tmp = buf.get_u8();
8868        __struct.response =
8869            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8870                enum_type: "CellularConfigResponse",
8871                value: tmp as u64,
8872            })?;
8873        Ok(__struct)
8874    }
8875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8876        let mut __tmp = BytesMut::new(bytes);
8877        #[allow(clippy::absurd_extreme_comparisons)]
8878        #[allow(unused_comparisons)]
8879        if __tmp.remaining() < Self::ENCODED_LEN {
8880            panic!(
8881                "buffer is too small (need {} bytes, but got {})",
8882                Self::ENCODED_LEN,
8883                __tmp.remaining(),
8884            )
8885        }
8886        __tmp.put_u8(self.enable_lte);
8887        __tmp.put_u8(self.enable_pin);
8888        for val in &self.pin {
8889            __tmp.put_u8(*val);
8890        }
8891        for val in &self.new_pin {
8892            __tmp.put_u8(*val);
8893        }
8894        for val in &self.apn {
8895            __tmp.put_u8(*val);
8896        }
8897        for val in &self.puk {
8898            __tmp.put_u8(*val);
8899        }
8900        __tmp.put_u8(self.roaming);
8901        __tmp.put_u8(self.response as u8);
8902        if matches!(version, MavlinkVersion::V2) {
8903            let len = __tmp.len();
8904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8905        } else {
8906            __tmp.len()
8907        }
8908    }
8909}
8910#[doc = "Report current used cellular network status."]
8911#[doc = ""]
8912#[doc = "ID: 334"]
8913#[derive(Debug, Clone, PartialEq)]
8914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8916#[cfg_attr(feature = "ts", derive(TS))]
8917#[cfg_attr(feature = "ts", ts(export))]
8918pub struct CELLULAR_STATUS_DATA {
8919    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8920    pub mcc: u16,
8921    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8922    pub mnc: u16,
8923    #[doc = "Location area code. If unknown, set to 0"]
8924    pub lac: u16,
8925    #[doc = "Cellular modem status"]
8926    pub status: CellularStatusFlag,
8927    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8928    pub failure_reason: CellularNetworkFailedReason,
8929    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8930    pub mavtype: CellularNetworkRadioType,
8931    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8932    pub quality: u8,
8933}
8934impl CELLULAR_STATUS_DATA {
8935    pub const ENCODED_LEN: usize = 10usize;
8936    pub const DEFAULT: Self = Self {
8937        mcc: 0_u16,
8938        mnc: 0_u16,
8939        lac: 0_u16,
8940        status: CellularStatusFlag::DEFAULT,
8941        failure_reason: CellularNetworkFailedReason::DEFAULT,
8942        mavtype: CellularNetworkRadioType::DEFAULT,
8943        quality: 0_u8,
8944    };
8945    #[cfg(feature = "arbitrary")]
8946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8947        use arbitrary::{Arbitrary, Unstructured};
8948        let mut buf = [0u8; 1024];
8949        rng.fill_bytes(&mut buf);
8950        let mut unstructured = Unstructured::new(&buf);
8951        Self::arbitrary(&mut unstructured).unwrap_or_default()
8952    }
8953}
8954impl Default for CELLULAR_STATUS_DATA {
8955    fn default() -> Self {
8956        Self::DEFAULT.clone()
8957    }
8958}
8959impl MessageData for CELLULAR_STATUS_DATA {
8960    type Message = MavMessage;
8961    const ID: u32 = 334u32;
8962    const NAME: &'static str = "CELLULAR_STATUS";
8963    const EXTRA_CRC: u8 = 72u8;
8964    const ENCODED_LEN: usize = 10usize;
8965    fn deser(
8966        _version: MavlinkVersion,
8967        __input: &[u8],
8968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8969        let avail_len = __input.len();
8970        let mut payload_buf = [0; Self::ENCODED_LEN];
8971        let mut buf = if avail_len < Self::ENCODED_LEN {
8972            payload_buf[0..avail_len].copy_from_slice(__input);
8973            Bytes::new(&payload_buf)
8974        } else {
8975            Bytes::new(__input)
8976        };
8977        let mut __struct = Self::default();
8978        __struct.mcc = buf.get_u16_le();
8979        __struct.mnc = buf.get_u16_le();
8980        __struct.lac = buf.get_u16_le();
8981        let tmp = buf.get_u8();
8982        __struct.status =
8983            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8984                enum_type: "CellularStatusFlag",
8985                value: tmp as u64,
8986            })?;
8987        let tmp = buf.get_u8();
8988        __struct.failure_reason =
8989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8990                enum_type: "CellularNetworkFailedReason",
8991                value: tmp as u64,
8992            })?;
8993        let tmp = buf.get_u8();
8994        __struct.mavtype =
8995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8996                enum_type: "CellularNetworkRadioType",
8997                value: tmp as u64,
8998            })?;
8999        __struct.quality = buf.get_u8();
9000        Ok(__struct)
9001    }
9002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9003        let mut __tmp = BytesMut::new(bytes);
9004        #[allow(clippy::absurd_extreme_comparisons)]
9005        #[allow(unused_comparisons)]
9006        if __tmp.remaining() < Self::ENCODED_LEN {
9007            panic!(
9008                "buffer is too small (need {} bytes, but got {})",
9009                Self::ENCODED_LEN,
9010                __tmp.remaining(),
9011            )
9012        }
9013        __tmp.put_u16_le(self.mcc);
9014        __tmp.put_u16_le(self.mnc);
9015        __tmp.put_u16_le(self.lac);
9016        __tmp.put_u8(self.status as u8);
9017        __tmp.put_u8(self.failure_reason as u8);
9018        __tmp.put_u8(self.mavtype as u8);
9019        __tmp.put_u8(self.quality);
9020        if matches!(version, MavlinkVersion::V2) {
9021            let len = __tmp.len();
9022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9023        } else {
9024            __tmp.len()
9025        }
9026    }
9027}
9028#[doc = "Request to control this MAV."]
9029#[doc = ""]
9030#[doc = "ID: 5"]
9031#[derive(Debug, Clone, PartialEq)]
9032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9034#[cfg_attr(feature = "ts", derive(TS))]
9035#[cfg_attr(feature = "ts", ts(export))]
9036pub struct CHANGE_OPERATOR_CONTROL_DATA {
9037    #[doc = "System the GCS requests control for"]
9038    pub target_system: u8,
9039    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9040    pub control_request: u8,
9041    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9042    pub version: u8,
9043    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9044    #[cfg_attr(feature = "ts", ts(type = "string"))]
9045    pub passkey: CharArray<25>,
9046}
9047impl CHANGE_OPERATOR_CONTROL_DATA {
9048    pub const ENCODED_LEN: usize = 28usize;
9049    pub const DEFAULT: Self = Self {
9050        target_system: 0_u8,
9051        control_request: 0_u8,
9052        version: 0_u8,
9053        passkey: CharArray::new([0_u8; 25usize]),
9054    };
9055    #[cfg(feature = "arbitrary")]
9056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9057        use arbitrary::{Arbitrary, Unstructured};
9058        let mut buf = [0u8; 1024];
9059        rng.fill_bytes(&mut buf);
9060        let mut unstructured = Unstructured::new(&buf);
9061        Self::arbitrary(&mut unstructured).unwrap_or_default()
9062    }
9063}
9064impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9065    fn default() -> Self {
9066        Self::DEFAULT.clone()
9067    }
9068}
9069impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9070    type Message = MavMessage;
9071    const ID: u32 = 5u32;
9072    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9073    const EXTRA_CRC: u8 = 217u8;
9074    const ENCODED_LEN: usize = 28usize;
9075    fn deser(
9076        _version: MavlinkVersion,
9077        __input: &[u8],
9078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9079        let avail_len = __input.len();
9080        let mut payload_buf = [0; Self::ENCODED_LEN];
9081        let mut buf = if avail_len < Self::ENCODED_LEN {
9082            payload_buf[0..avail_len].copy_from_slice(__input);
9083            Bytes::new(&payload_buf)
9084        } else {
9085            Bytes::new(__input)
9086        };
9087        let mut __struct = Self::default();
9088        __struct.target_system = buf.get_u8();
9089        __struct.control_request = buf.get_u8();
9090        __struct.version = buf.get_u8();
9091        let mut tmp = [0_u8; 25usize];
9092        for v in &mut tmp {
9093            *v = buf.get_u8();
9094        }
9095        __struct.passkey = CharArray::new(tmp);
9096        Ok(__struct)
9097    }
9098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9099        let mut __tmp = BytesMut::new(bytes);
9100        #[allow(clippy::absurd_extreme_comparisons)]
9101        #[allow(unused_comparisons)]
9102        if __tmp.remaining() < Self::ENCODED_LEN {
9103            panic!(
9104                "buffer is too small (need {} bytes, but got {})",
9105                Self::ENCODED_LEN,
9106                __tmp.remaining(),
9107            )
9108        }
9109        __tmp.put_u8(self.target_system);
9110        __tmp.put_u8(self.control_request);
9111        __tmp.put_u8(self.version);
9112        for val in &self.passkey {
9113            __tmp.put_u8(*val);
9114        }
9115        if matches!(version, MavlinkVersion::V2) {
9116            let len = __tmp.len();
9117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9118        } else {
9119            __tmp.len()
9120        }
9121    }
9122}
9123#[doc = "Accept / deny control of this MAV."]
9124#[doc = ""]
9125#[doc = "ID: 6"]
9126#[derive(Debug, Clone, PartialEq)]
9127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9129#[cfg_attr(feature = "ts", derive(TS))]
9130#[cfg_attr(feature = "ts", ts(export))]
9131pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9132    #[doc = "ID of the GCS this message"]
9133    pub gcs_system_id: u8,
9134    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9135    pub control_request: u8,
9136    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9137    pub ack: u8,
9138}
9139impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9140    pub const ENCODED_LEN: usize = 3usize;
9141    pub const DEFAULT: Self = Self {
9142        gcs_system_id: 0_u8,
9143        control_request: 0_u8,
9144        ack: 0_u8,
9145    };
9146    #[cfg(feature = "arbitrary")]
9147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9148        use arbitrary::{Arbitrary, Unstructured};
9149        let mut buf = [0u8; 1024];
9150        rng.fill_bytes(&mut buf);
9151        let mut unstructured = Unstructured::new(&buf);
9152        Self::arbitrary(&mut unstructured).unwrap_or_default()
9153    }
9154}
9155impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9156    fn default() -> Self {
9157        Self::DEFAULT.clone()
9158    }
9159}
9160impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9161    type Message = MavMessage;
9162    const ID: u32 = 6u32;
9163    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9164    const EXTRA_CRC: u8 = 104u8;
9165    const ENCODED_LEN: usize = 3usize;
9166    fn deser(
9167        _version: MavlinkVersion,
9168        __input: &[u8],
9169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9170        let avail_len = __input.len();
9171        let mut payload_buf = [0; Self::ENCODED_LEN];
9172        let mut buf = if avail_len < Self::ENCODED_LEN {
9173            payload_buf[0..avail_len].copy_from_slice(__input);
9174            Bytes::new(&payload_buf)
9175        } else {
9176            Bytes::new(__input)
9177        };
9178        let mut __struct = Self::default();
9179        __struct.gcs_system_id = buf.get_u8();
9180        __struct.control_request = buf.get_u8();
9181        __struct.ack = buf.get_u8();
9182        Ok(__struct)
9183    }
9184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9185        let mut __tmp = BytesMut::new(bytes);
9186        #[allow(clippy::absurd_extreme_comparisons)]
9187        #[allow(unused_comparisons)]
9188        if __tmp.remaining() < Self::ENCODED_LEN {
9189            panic!(
9190                "buffer is too small (need {} bytes, but got {})",
9191                Self::ENCODED_LEN,
9192                __tmp.remaining(),
9193            )
9194        }
9195        __tmp.put_u8(self.gcs_system_id);
9196        __tmp.put_u8(self.control_request);
9197        __tmp.put_u8(self.ack);
9198        if matches!(version, MavlinkVersion::V2) {
9199            let len = __tmp.len();
9200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9201        } else {
9202            __tmp.len()
9203        }
9204    }
9205}
9206#[doc = "Information about a potential collision."]
9207#[doc = ""]
9208#[doc = "ID: 247"]
9209#[derive(Debug, Clone, PartialEq)]
9210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9212#[cfg_attr(feature = "ts", derive(TS))]
9213#[cfg_attr(feature = "ts", ts(export))]
9214pub struct COLLISION_DATA {
9215    #[doc = "Unique identifier, domain based on src field"]
9216    pub id: u32,
9217    #[doc = "Estimated time until collision occurs"]
9218    pub time_to_minimum_delta: f32,
9219    #[doc = "Closest vertical distance between vehicle and object"]
9220    pub altitude_minimum_delta: f32,
9221    #[doc = "Closest horizontal distance between vehicle and object"]
9222    pub horizontal_minimum_delta: f32,
9223    #[doc = "Collision data source"]
9224    pub src: MavCollisionSrc,
9225    #[doc = "Action that is being taken to avoid this collision"]
9226    pub action: MavCollisionAction,
9227    #[doc = "How concerned the aircraft is about this collision"]
9228    pub threat_level: MavCollisionThreatLevel,
9229}
9230impl COLLISION_DATA {
9231    pub const ENCODED_LEN: usize = 19usize;
9232    pub const DEFAULT: Self = Self {
9233        id: 0_u32,
9234        time_to_minimum_delta: 0.0_f32,
9235        altitude_minimum_delta: 0.0_f32,
9236        horizontal_minimum_delta: 0.0_f32,
9237        src: MavCollisionSrc::DEFAULT,
9238        action: MavCollisionAction::DEFAULT,
9239        threat_level: MavCollisionThreatLevel::DEFAULT,
9240    };
9241    #[cfg(feature = "arbitrary")]
9242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9243        use arbitrary::{Arbitrary, Unstructured};
9244        let mut buf = [0u8; 1024];
9245        rng.fill_bytes(&mut buf);
9246        let mut unstructured = Unstructured::new(&buf);
9247        Self::arbitrary(&mut unstructured).unwrap_or_default()
9248    }
9249}
9250impl Default for COLLISION_DATA {
9251    fn default() -> Self {
9252        Self::DEFAULT.clone()
9253    }
9254}
9255impl MessageData for COLLISION_DATA {
9256    type Message = MavMessage;
9257    const ID: u32 = 247u32;
9258    const NAME: &'static str = "COLLISION";
9259    const EXTRA_CRC: u8 = 81u8;
9260    const ENCODED_LEN: usize = 19usize;
9261    fn deser(
9262        _version: MavlinkVersion,
9263        __input: &[u8],
9264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9265        let avail_len = __input.len();
9266        let mut payload_buf = [0; Self::ENCODED_LEN];
9267        let mut buf = if avail_len < Self::ENCODED_LEN {
9268            payload_buf[0..avail_len].copy_from_slice(__input);
9269            Bytes::new(&payload_buf)
9270        } else {
9271            Bytes::new(__input)
9272        };
9273        let mut __struct = Self::default();
9274        __struct.id = buf.get_u32_le();
9275        __struct.time_to_minimum_delta = buf.get_f32_le();
9276        __struct.altitude_minimum_delta = buf.get_f32_le();
9277        __struct.horizontal_minimum_delta = buf.get_f32_le();
9278        let tmp = buf.get_u8();
9279        __struct.src =
9280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9281                enum_type: "MavCollisionSrc",
9282                value: tmp as u64,
9283            })?;
9284        let tmp = buf.get_u8();
9285        __struct.action =
9286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9287                enum_type: "MavCollisionAction",
9288                value: tmp as u64,
9289            })?;
9290        let tmp = buf.get_u8();
9291        __struct.threat_level =
9292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9293                enum_type: "MavCollisionThreatLevel",
9294                value: tmp as u64,
9295            })?;
9296        Ok(__struct)
9297    }
9298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9299        let mut __tmp = BytesMut::new(bytes);
9300        #[allow(clippy::absurd_extreme_comparisons)]
9301        #[allow(unused_comparisons)]
9302        if __tmp.remaining() < Self::ENCODED_LEN {
9303            panic!(
9304                "buffer is too small (need {} bytes, but got {})",
9305                Self::ENCODED_LEN,
9306                __tmp.remaining(),
9307            )
9308        }
9309        __tmp.put_u32_le(self.id);
9310        __tmp.put_f32_le(self.time_to_minimum_delta);
9311        __tmp.put_f32_le(self.altitude_minimum_delta);
9312        __tmp.put_f32_le(self.horizontal_minimum_delta);
9313        __tmp.put_u8(self.src as u8);
9314        __tmp.put_u8(self.action as u8);
9315        __tmp.put_u8(self.threat_level as u8);
9316        if matches!(version, MavlinkVersion::V2) {
9317            let len = __tmp.len();
9318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9319        } else {
9320            __tmp.len()
9321        }
9322    }
9323}
9324#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9325#[doc = ""]
9326#[doc = "ID: 77"]
9327#[derive(Debug, Clone, PartialEq)]
9328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9330#[cfg_attr(feature = "ts", derive(TS))]
9331#[cfg_attr(feature = "ts", ts(export))]
9332pub struct COMMAND_ACK_DATA {
9333    #[doc = "Command ID (of acknowledged command)."]
9334    pub command: MavCmd,
9335    #[doc = "Result of command."]
9336    pub result: MavResult,
9337    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9339    pub progress: u8,
9340    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9341    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9342    pub result_param2: i32,
9343    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9345    pub target_system: u8,
9346    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9348    pub target_component: u8,
9349}
9350impl COMMAND_ACK_DATA {
9351    pub const ENCODED_LEN: usize = 10usize;
9352    pub const DEFAULT: Self = Self {
9353        command: MavCmd::DEFAULT,
9354        result: MavResult::DEFAULT,
9355        progress: 0_u8,
9356        result_param2: 0_i32,
9357        target_system: 0_u8,
9358        target_component: 0_u8,
9359    };
9360    #[cfg(feature = "arbitrary")]
9361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9362        use arbitrary::{Arbitrary, Unstructured};
9363        let mut buf = [0u8; 1024];
9364        rng.fill_bytes(&mut buf);
9365        let mut unstructured = Unstructured::new(&buf);
9366        Self::arbitrary(&mut unstructured).unwrap_or_default()
9367    }
9368}
9369impl Default for COMMAND_ACK_DATA {
9370    fn default() -> Self {
9371        Self::DEFAULT.clone()
9372    }
9373}
9374impl MessageData for COMMAND_ACK_DATA {
9375    type Message = MavMessage;
9376    const ID: u32 = 77u32;
9377    const NAME: &'static str = "COMMAND_ACK";
9378    const EXTRA_CRC: u8 = 143u8;
9379    const ENCODED_LEN: usize = 10usize;
9380    fn deser(
9381        _version: MavlinkVersion,
9382        __input: &[u8],
9383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9384        let avail_len = __input.len();
9385        let mut payload_buf = [0; Self::ENCODED_LEN];
9386        let mut buf = if avail_len < Self::ENCODED_LEN {
9387            payload_buf[0..avail_len].copy_from_slice(__input);
9388            Bytes::new(&payload_buf)
9389        } else {
9390            Bytes::new(__input)
9391        };
9392        let mut __struct = Self::default();
9393        let tmp = buf.get_u16_le();
9394        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9395            ::mavlink_core::error::ParserError::InvalidEnum {
9396                enum_type: "MavCmd",
9397                value: tmp as u64,
9398            },
9399        )?;
9400        let tmp = buf.get_u8();
9401        __struct.result =
9402            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9403                enum_type: "MavResult",
9404                value: tmp as u64,
9405            })?;
9406        __struct.progress = buf.get_u8();
9407        __struct.result_param2 = buf.get_i32_le();
9408        __struct.target_system = buf.get_u8();
9409        __struct.target_component = buf.get_u8();
9410        Ok(__struct)
9411    }
9412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9413        let mut __tmp = BytesMut::new(bytes);
9414        #[allow(clippy::absurd_extreme_comparisons)]
9415        #[allow(unused_comparisons)]
9416        if __tmp.remaining() < Self::ENCODED_LEN {
9417            panic!(
9418                "buffer is too small (need {} bytes, but got {})",
9419                Self::ENCODED_LEN,
9420                __tmp.remaining(),
9421            )
9422        }
9423        __tmp.put_u16_le(self.command as u16);
9424        __tmp.put_u8(self.result as u8);
9425        if matches!(version, MavlinkVersion::V2) {
9426            __tmp.put_u8(self.progress);
9427            __tmp.put_i32_le(self.result_param2);
9428            __tmp.put_u8(self.target_system);
9429            __tmp.put_u8(self.target_component);
9430            let len = __tmp.len();
9431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9432        } else {
9433            __tmp.len()
9434        }
9435    }
9436}
9437#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9438#[doc = ""]
9439#[doc = "ID: 80"]
9440#[derive(Debug, Clone, PartialEq)]
9441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9443#[cfg_attr(feature = "ts", derive(TS))]
9444#[cfg_attr(feature = "ts", ts(export))]
9445pub struct COMMAND_CANCEL_DATA {
9446    #[doc = "Command ID (of command to cancel)."]
9447    pub command: MavCmd,
9448    #[doc = "System executing long running command. Should not be broadcast (0)."]
9449    pub target_system: u8,
9450    #[doc = "Component executing long running command."]
9451    pub target_component: u8,
9452}
9453impl COMMAND_CANCEL_DATA {
9454    pub const ENCODED_LEN: usize = 4usize;
9455    pub const DEFAULT: Self = Self {
9456        command: MavCmd::DEFAULT,
9457        target_system: 0_u8,
9458        target_component: 0_u8,
9459    };
9460    #[cfg(feature = "arbitrary")]
9461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9462        use arbitrary::{Arbitrary, Unstructured};
9463        let mut buf = [0u8; 1024];
9464        rng.fill_bytes(&mut buf);
9465        let mut unstructured = Unstructured::new(&buf);
9466        Self::arbitrary(&mut unstructured).unwrap_or_default()
9467    }
9468}
9469impl Default for COMMAND_CANCEL_DATA {
9470    fn default() -> Self {
9471        Self::DEFAULT.clone()
9472    }
9473}
9474impl MessageData for COMMAND_CANCEL_DATA {
9475    type Message = MavMessage;
9476    const ID: u32 = 80u32;
9477    const NAME: &'static str = "COMMAND_CANCEL";
9478    const EXTRA_CRC: u8 = 14u8;
9479    const ENCODED_LEN: usize = 4usize;
9480    fn deser(
9481        _version: MavlinkVersion,
9482        __input: &[u8],
9483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9484        let avail_len = __input.len();
9485        let mut payload_buf = [0; Self::ENCODED_LEN];
9486        let mut buf = if avail_len < Self::ENCODED_LEN {
9487            payload_buf[0..avail_len].copy_from_slice(__input);
9488            Bytes::new(&payload_buf)
9489        } else {
9490            Bytes::new(__input)
9491        };
9492        let mut __struct = Self::default();
9493        let tmp = buf.get_u16_le();
9494        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9495            ::mavlink_core::error::ParserError::InvalidEnum {
9496                enum_type: "MavCmd",
9497                value: tmp as u64,
9498            },
9499        )?;
9500        __struct.target_system = buf.get_u8();
9501        __struct.target_component = buf.get_u8();
9502        Ok(__struct)
9503    }
9504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9505        let mut __tmp = BytesMut::new(bytes);
9506        #[allow(clippy::absurd_extreme_comparisons)]
9507        #[allow(unused_comparisons)]
9508        if __tmp.remaining() < Self::ENCODED_LEN {
9509            panic!(
9510                "buffer is too small (need {} bytes, but got {})",
9511                Self::ENCODED_LEN,
9512                __tmp.remaining(),
9513            )
9514        }
9515        __tmp.put_u16_le(self.command as u16);
9516        __tmp.put_u8(self.target_system);
9517        __tmp.put_u8(self.target_component);
9518        if matches!(version, MavlinkVersion::V2) {
9519            let len = __tmp.len();
9520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9521        } else {
9522            __tmp.len()
9523        }
9524    }
9525}
9526#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9527#[doc = ""]
9528#[doc = "ID: 75"]
9529#[derive(Debug, Clone, PartialEq)]
9530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9532#[cfg_attr(feature = "ts", derive(TS))]
9533#[cfg_attr(feature = "ts", ts(export))]
9534pub struct COMMAND_INT_DATA {
9535    #[doc = "PARAM1, see MAV_CMD enum"]
9536    pub param1: f32,
9537    #[doc = "PARAM2, see MAV_CMD enum"]
9538    pub param2: f32,
9539    #[doc = "PARAM3, see MAV_CMD enum"]
9540    pub param3: f32,
9541    #[doc = "PARAM4, see MAV_CMD enum"]
9542    pub param4: f32,
9543    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9544    pub x: i32,
9545    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9546    pub y: i32,
9547    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9548    pub z: f32,
9549    #[doc = "The scheduled action for the mission item."]
9550    pub command: MavCmd,
9551    #[doc = "System ID"]
9552    pub target_system: u8,
9553    #[doc = "Component ID"]
9554    pub target_component: u8,
9555    #[doc = "The coordinate system of the COMMAND."]
9556    pub frame: MavFrame,
9557    #[doc = "Not used."]
9558    pub current: u8,
9559    #[doc = "Not used (set 0)."]
9560    pub autocontinue: u8,
9561}
9562impl COMMAND_INT_DATA {
9563    pub const ENCODED_LEN: usize = 35usize;
9564    pub const DEFAULT: Self = Self {
9565        param1: 0.0_f32,
9566        param2: 0.0_f32,
9567        param3: 0.0_f32,
9568        param4: 0.0_f32,
9569        x: 0_i32,
9570        y: 0_i32,
9571        z: 0.0_f32,
9572        command: MavCmd::DEFAULT,
9573        target_system: 0_u8,
9574        target_component: 0_u8,
9575        frame: MavFrame::DEFAULT,
9576        current: 0_u8,
9577        autocontinue: 0_u8,
9578    };
9579    #[cfg(feature = "arbitrary")]
9580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9581        use arbitrary::{Arbitrary, Unstructured};
9582        let mut buf = [0u8; 1024];
9583        rng.fill_bytes(&mut buf);
9584        let mut unstructured = Unstructured::new(&buf);
9585        Self::arbitrary(&mut unstructured).unwrap_or_default()
9586    }
9587}
9588impl Default for COMMAND_INT_DATA {
9589    fn default() -> Self {
9590        Self::DEFAULT.clone()
9591    }
9592}
9593impl MessageData for COMMAND_INT_DATA {
9594    type Message = MavMessage;
9595    const ID: u32 = 75u32;
9596    const NAME: &'static str = "COMMAND_INT";
9597    const EXTRA_CRC: u8 = 158u8;
9598    const ENCODED_LEN: usize = 35usize;
9599    fn deser(
9600        _version: MavlinkVersion,
9601        __input: &[u8],
9602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9603        let avail_len = __input.len();
9604        let mut payload_buf = [0; Self::ENCODED_LEN];
9605        let mut buf = if avail_len < Self::ENCODED_LEN {
9606            payload_buf[0..avail_len].copy_from_slice(__input);
9607            Bytes::new(&payload_buf)
9608        } else {
9609            Bytes::new(__input)
9610        };
9611        let mut __struct = Self::default();
9612        __struct.param1 = buf.get_f32_le();
9613        __struct.param2 = buf.get_f32_le();
9614        __struct.param3 = buf.get_f32_le();
9615        __struct.param4 = buf.get_f32_le();
9616        __struct.x = buf.get_i32_le();
9617        __struct.y = buf.get_i32_le();
9618        __struct.z = buf.get_f32_le();
9619        let tmp = buf.get_u16_le();
9620        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9621            ::mavlink_core::error::ParserError::InvalidEnum {
9622                enum_type: "MavCmd",
9623                value: tmp as u64,
9624            },
9625        )?;
9626        __struct.target_system = buf.get_u8();
9627        __struct.target_component = buf.get_u8();
9628        let tmp = buf.get_u8();
9629        __struct.frame =
9630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9631                enum_type: "MavFrame",
9632                value: tmp as u64,
9633            })?;
9634        __struct.current = buf.get_u8();
9635        __struct.autocontinue = buf.get_u8();
9636        Ok(__struct)
9637    }
9638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9639        let mut __tmp = BytesMut::new(bytes);
9640        #[allow(clippy::absurd_extreme_comparisons)]
9641        #[allow(unused_comparisons)]
9642        if __tmp.remaining() < Self::ENCODED_LEN {
9643            panic!(
9644                "buffer is too small (need {} bytes, but got {})",
9645                Self::ENCODED_LEN,
9646                __tmp.remaining(),
9647            )
9648        }
9649        __tmp.put_f32_le(self.param1);
9650        __tmp.put_f32_le(self.param2);
9651        __tmp.put_f32_le(self.param3);
9652        __tmp.put_f32_le(self.param4);
9653        __tmp.put_i32_le(self.x);
9654        __tmp.put_i32_le(self.y);
9655        __tmp.put_f32_le(self.z);
9656        __tmp.put_u16_le(self.command as u16);
9657        __tmp.put_u8(self.target_system);
9658        __tmp.put_u8(self.target_component);
9659        __tmp.put_u8(self.frame as u8);
9660        __tmp.put_u8(self.current);
9661        __tmp.put_u8(self.autocontinue);
9662        if matches!(version, MavlinkVersion::V2) {
9663            let len = __tmp.len();
9664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9665        } else {
9666            __tmp.len()
9667        }
9668    }
9669}
9670#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9671#[doc = ""]
9672#[doc = "ID: 76"]
9673#[derive(Debug, Clone, PartialEq)]
9674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9676#[cfg_attr(feature = "ts", derive(TS))]
9677#[cfg_attr(feature = "ts", ts(export))]
9678pub struct COMMAND_LONG_DATA {
9679    #[doc = "Parameter 1 (for the specific command)."]
9680    pub param1: f32,
9681    #[doc = "Parameter 2 (for the specific command)."]
9682    pub param2: f32,
9683    #[doc = "Parameter 3 (for the specific command)."]
9684    pub param3: f32,
9685    #[doc = "Parameter 4 (for the specific command)."]
9686    pub param4: f32,
9687    #[doc = "Parameter 5 (for the specific command)."]
9688    pub param5: f32,
9689    #[doc = "Parameter 6 (for the specific command)."]
9690    pub param6: f32,
9691    #[doc = "Parameter 7 (for the specific command)."]
9692    pub param7: f32,
9693    #[doc = "Command ID (of command to send)."]
9694    pub command: MavCmd,
9695    #[doc = "System which should execute the command"]
9696    pub target_system: u8,
9697    #[doc = "Component which should execute the command, 0 for all components"]
9698    pub target_component: u8,
9699    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9700    pub confirmation: u8,
9701}
9702impl COMMAND_LONG_DATA {
9703    pub const ENCODED_LEN: usize = 33usize;
9704    pub const DEFAULT: Self = Self {
9705        param1: 0.0_f32,
9706        param2: 0.0_f32,
9707        param3: 0.0_f32,
9708        param4: 0.0_f32,
9709        param5: 0.0_f32,
9710        param6: 0.0_f32,
9711        param7: 0.0_f32,
9712        command: MavCmd::DEFAULT,
9713        target_system: 0_u8,
9714        target_component: 0_u8,
9715        confirmation: 0_u8,
9716    };
9717    #[cfg(feature = "arbitrary")]
9718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9719        use arbitrary::{Arbitrary, Unstructured};
9720        let mut buf = [0u8; 1024];
9721        rng.fill_bytes(&mut buf);
9722        let mut unstructured = Unstructured::new(&buf);
9723        Self::arbitrary(&mut unstructured).unwrap_or_default()
9724    }
9725}
9726impl Default for COMMAND_LONG_DATA {
9727    fn default() -> Self {
9728        Self::DEFAULT.clone()
9729    }
9730}
9731impl MessageData for COMMAND_LONG_DATA {
9732    type Message = MavMessage;
9733    const ID: u32 = 76u32;
9734    const NAME: &'static str = "COMMAND_LONG";
9735    const EXTRA_CRC: u8 = 152u8;
9736    const ENCODED_LEN: usize = 33usize;
9737    fn deser(
9738        _version: MavlinkVersion,
9739        __input: &[u8],
9740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9741        let avail_len = __input.len();
9742        let mut payload_buf = [0; Self::ENCODED_LEN];
9743        let mut buf = if avail_len < Self::ENCODED_LEN {
9744            payload_buf[0..avail_len].copy_from_slice(__input);
9745            Bytes::new(&payload_buf)
9746        } else {
9747            Bytes::new(__input)
9748        };
9749        let mut __struct = Self::default();
9750        __struct.param1 = buf.get_f32_le();
9751        __struct.param2 = buf.get_f32_le();
9752        __struct.param3 = buf.get_f32_le();
9753        __struct.param4 = buf.get_f32_le();
9754        __struct.param5 = buf.get_f32_le();
9755        __struct.param6 = buf.get_f32_le();
9756        __struct.param7 = buf.get_f32_le();
9757        let tmp = buf.get_u16_le();
9758        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9759            ::mavlink_core::error::ParserError::InvalidEnum {
9760                enum_type: "MavCmd",
9761                value: tmp as u64,
9762            },
9763        )?;
9764        __struct.target_system = buf.get_u8();
9765        __struct.target_component = buf.get_u8();
9766        __struct.confirmation = buf.get_u8();
9767        Ok(__struct)
9768    }
9769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9770        let mut __tmp = BytesMut::new(bytes);
9771        #[allow(clippy::absurd_extreme_comparisons)]
9772        #[allow(unused_comparisons)]
9773        if __tmp.remaining() < Self::ENCODED_LEN {
9774            panic!(
9775                "buffer is too small (need {} bytes, but got {})",
9776                Self::ENCODED_LEN,
9777                __tmp.remaining(),
9778            )
9779        }
9780        __tmp.put_f32_le(self.param1);
9781        __tmp.put_f32_le(self.param2);
9782        __tmp.put_f32_le(self.param3);
9783        __tmp.put_f32_le(self.param4);
9784        __tmp.put_f32_le(self.param5);
9785        __tmp.put_f32_le(self.param6);
9786        __tmp.put_f32_le(self.param7);
9787        __tmp.put_u16_le(self.command as u16);
9788        __tmp.put_u8(self.target_system);
9789        __tmp.put_u8(self.target_component);
9790        __tmp.put_u8(self.confirmation);
9791        if matches!(version, MavlinkVersion::V2) {
9792            let len = __tmp.len();
9793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9794        } else {
9795            __tmp.len()
9796        }
9797    }
9798}
9799#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9800#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9801#[doc = ""]
9802#[doc = "ID: 395"]
9803#[derive(Debug, Clone, PartialEq)]
9804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9806#[cfg_attr(feature = "ts", derive(TS))]
9807#[cfg_attr(feature = "ts", ts(export))]
9808pub struct COMPONENT_INFORMATION_DATA {
9809    #[doc = "Timestamp (time since system boot)."]
9810    pub time_boot_ms: u32,
9811    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9812    pub general_metadata_file_crc: u32,
9813    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9814    pub peripherals_metadata_file_crc: u32,
9815    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9816    #[cfg_attr(feature = "ts", ts(type = "string"))]
9817    pub general_metadata_uri: CharArray<100>,
9818    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9819    #[cfg_attr(feature = "ts", ts(type = "string"))]
9820    pub peripherals_metadata_uri: CharArray<100>,
9821}
9822impl COMPONENT_INFORMATION_DATA {
9823    pub const ENCODED_LEN: usize = 212usize;
9824    pub const DEFAULT: Self = Self {
9825        time_boot_ms: 0_u32,
9826        general_metadata_file_crc: 0_u32,
9827        peripherals_metadata_file_crc: 0_u32,
9828        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9829        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9830    };
9831    #[cfg(feature = "arbitrary")]
9832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9833        use arbitrary::{Arbitrary, Unstructured};
9834        let mut buf = [0u8; 1024];
9835        rng.fill_bytes(&mut buf);
9836        let mut unstructured = Unstructured::new(&buf);
9837        Self::arbitrary(&mut unstructured).unwrap_or_default()
9838    }
9839}
9840impl Default for COMPONENT_INFORMATION_DATA {
9841    fn default() -> Self {
9842        Self::DEFAULT.clone()
9843    }
9844}
9845impl MessageData for COMPONENT_INFORMATION_DATA {
9846    type Message = MavMessage;
9847    const ID: u32 = 395u32;
9848    const NAME: &'static str = "COMPONENT_INFORMATION";
9849    const EXTRA_CRC: u8 = 0u8;
9850    const ENCODED_LEN: usize = 212usize;
9851    fn deser(
9852        _version: MavlinkVersion,
9853        __input: &[u8],
9854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9855        let avail_len = __input.len();
9856        let mut payload_buf = [0; Self::ENCODED_LEN];
9857        let mut buf = if avail_len < Self::ENCODED_LEN {
9858            payload_buf[0..avail_len].copy_from_slice(__input);
9859            Bytes::new(&payload_buf)
9860        } else {
9861            Bytes::new(__input)
9862        };
9863        let mut __struct = Self::default();
9864        __struct.time_boot_ms = buf.get_u32_le();
9865        __struct.general_metadata_file_crc = buf.get_u32_le();
9866        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9867        let mut tmp = [0_u8; 100usize];
9868        for v in &mut tmp {
9869            *v = buf.get_u8();
9870        }
9871        __struct.general_metadata_uri = CharArray::new(tmp);
9872        let mut tmp = [0_u8; 100usize];
9873        for v in &mut tmp {
9874            *v = buf.get_u8();
9875        }
9876        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9877        Ok(__struct)
9878    }
9879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9880        let mut __tmp = BytesMut::new(bytes);
9881        #[allow(clippy::absurd_extreme_comparisons)]
9882        #[allow(unused_comparisons)]
9883        if __tmp.remaining() < Self::ENCODED_LEN {
9884            panic!(
9885                "buffer is too small (need {} bytes, but got {})",
9886                Self::ENCODED_LEN,
9887                __tmp.remaining(),
9888            )
9889        }
9890        __tmp.put_u32_le(self.time_boot_ms);
9891        __tmp.put_u32_le(self.general_metadata_file_crc);
9892        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9893        for val in &self.general_metadata_uri {
9894            __tmp.put_u8(*val);
9895        }
9896        for val in &self.peripherals_metadata_uri {
9897            __tmp.put_u8(*val);
9898        }
9899        if matches!(version, MavlinkVersion::V2) {
9900            let len = __tmp.len();
9901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9902        } else {
9903            __tmp.len()
9904        }
9905    }
9906}
9907#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9908#[doc = ""]
9909#[doc = "ID: 396"]
9910#[derive(Debug, Clone, PartialEq)]
9911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9913#[cfg_attr(feature = "ts", derive(TS))]
9914#[cfg_attr(feature = "ts", ts(export))]
9915pub struct COMPONENT_INFORMATION_BASIC_DATA {
9916    #[doc = "Component capability flags"]
9917    pub capabilities: MavProtocolCapability,
9918    #[doc = "Timestamp (time since system boot)."]
9919    pub time_boot_ms: u32,
9920    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9921    pub time_manufacture_s: u32,
9922    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9923    #[cfg_attr(feature = "ts", ts(type = "string"))]
9924    pub vendor_name: CharArray<32>,
9925    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9926    #[cfg_attr(feature = "ts", ts(type = "string"))]
9927    pub model_name: CharArray<32>,
9928    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9929    #[cfg_attr(feature = "ts", ts(type = "string"))]
9930    pub software_version: CharArray<24>,
9931    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9932    #[cfg_attr(feature = "ts", ts(type = "string"))]
9933    pub hardware_version: CharArray<24>,
9934    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9935    #[cfg_attr(feature = "ts", ts(type = "string"))]
9936    pub serial_number: CharArray<32>,
9937}
9938impl COMPONENT_INFORMATION_BASIC_DATA {
9939    pub const ENCODED_LEN: usize = 160usize;
9940    pub const DEFAULT: Self = Self {
9941        capabilities: MavProtocolCapability::DEFAULT,
9942        time_boot_ms: 0_u32,
9943        time_manufacture_s: 0_u32,
9944        vendor_name: CharArray::new([0_u8; 32usize]),
9945        model_name: CharArray::new([0_u8; 32usize]),
9946        software_version: CharArray::new([0_u8; 24usize]),
9947        hardware_version: CharArray::new([0_u8; 24usize]),
9948        serial_number: CharArray::new([0_u8; 32usize]),
9949    };
9950    #[cfg(feature = "arbitrary")]
9951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9952        use arbitrary::{Arbitrary, Unstructured};
9953        let mut buf = [0u8; 1024];
9954        rng.fill_bytes(&mut buf);
9955        let mut unstructured = Unstructured::new(&buf);
9956        Self::arbitrary(&mut unstructured).unwrap_or_default()
9957    }
9958}
9959impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9960    fn default() -> Self {
9961        Self::DEFAULT.clone()
9962    }
9963}
9964impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9965    type Message = MavMessage;
9966    const ID: u32 = 396u32;
9967    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9968    const EXTRA_CRC: u8 = 50u8;
9969    const ENCODED_LEN: usize = 160usize;
9970    fn deser(
9971        _version: MavlinkVersion,
9972        __input: &[u8],
9973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9974        let avail_len = __input.len();
9975        let mut payload_buf = [0; Self::ENCODED_LEN];
9976        let mut buf = if avail_len < Self::ENCODED_LEN {
9977            payload_buf[0..avail_len].copy_from_slice(__input);
9978            Bytes::new(&payload_buf)
9979        } else {
9980            Bytes::new(__input)
9981        };
9982        let mut __struct = Self::default();
9983        let tmp = buf.get_u64_le();
9984        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
9985            ::mavlink_core::error::ParserError::InvalidFlag {
9986                flag_type: "MavProtocolCapability",
9987                value: tmp as u64,
9988            },
9989        )?;
9990        __struct.time_boot_ms = buf.get_u32_le();
9991        __struct.time_manufacture_s = buf.get_u32_le();
9992        let mut tmp = [0_u8; 32usize];
9993        for v in &mut tmp {
9994            *v = buf.get_u8();
9995        }
9996        __struct.vendor_name = CharArray::new(tmp);
9997        let mut tmp = [0_u8; 32usize];
9998        for v in &mut tmp {
9999            *v = buf.get_u8();
10000        }
10001        __struct.model_name = CharArray::new(tmp);
10002        let mut tmp = [0_u8; 24usize];
10003        for v in &mut tmp {
10004            *v = buf.get_u8();
10005        }
10006        __struct.software_version = CharArray::new(tmp);
10007        let mut tmp = [0_u8; 24usize];
10008        for v in &mut tmp {
10009            *v = buf.get_u8();
10010        }
10011        __struct.hardware_version = CharArray::new(tmp);
10012        let mut tmp = [0_u8; 32usize];
10013        for v in &mut tmp {
10014            *v = buf.get_u8();
10015        }
10016        __struct.serial_number = CharArray::new(tmp);
10017        Ok(__struct)
10018    }
10019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10020        let mut __tmp = BytesMut::new(bytes);
10021        #[allow(clippy::absurd_extreme_comparisons)]
10022        #[allow(unused_comparisons)]
10023        if __tmp.remaining() < Self::ENCODED_LEN {
10024            panic!(
10025                "buffer is too small (need {} bytes, but got {})",
10026                Self::ENCODED_LEN,
10027                __tmp.remaining(),
10028            )
10029        }
10030        __tmp.put_u64_le(self.capabilities.bits());
10031        __tmp.put_u32_le(self.time_boot_ms);
10032        __tmp.put_u32_le(self.time_manufacture_s);
10033        for val in &self.vendor_name {
10034            __tmp.put_u8(*val);
10035        }
10036        for val in &self.model_name {
10037            __tmp.put_u8(*val);
10038        }
10039        for val in &self.software_version {
10040            __tmp.put_u8(*val);
10041        }
10042        for val in &self.hardware_version {
10043            __tmp.put_u8(*val);
10044        }
10045        for val in &self.serial_number {
10046            __tmp.put_u8(*val);
10047        }
10048        if matches!(version, MavlinkVersion::V2) {
10049            let len = __tmp.len();
10050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10051        } else {
10052            __tmp.len()
10053        }
10054    }
10055}
10056#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10057#[doc = ""]
10058#[doc = "ID: 397"]
10059#[derive(Debug, Clone, PartialEq)]
10060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10062#[cfg_attr(feature = "ts", derive(TS))]
10063#[cfg_attr(feature = "ts", ts(export))]
10064pub struct COMPONENT_METADATA_DATA {
10065    #[doc = "Timestamp (time since system boot)."]
10066    pub time_boot_ms: u32,
10067    #[doc = "CRC32 of the general metadata file."]
10068    pub file_crc: u32,
10069    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10070    #[cfg_attr(feature = "ts", ts(type = "string"))]
10071    pub uri: CharArray<100>,
10072}
10073impl COMPONENT_METADATA_DATA {
10074    pub const ENCODED_LEN: usize = 108usize;
10075    pub const DEFAULT: Self = Self {
10076        time_boot_ms: 0_u32,
10077        file_crc: 0_u32,
10078        uri: CharArray::new([0_u8; 100usize]),
10079    };
10080    #[cfg(feature = "arbitrary")]
10081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10082        use arbitrary::{Arbitrary, Unstructured};
10083        let mut buf = [0u8; 1024];
10084        rng.fill_bytes(&mut buf);
10085        let mut unstructured = Unstructured::new(&buf);
10086        Self::arbitrary(&mut unstructured).unwrap_or_default()
10087    }
10088}
10089impl Default for COMPONENT_METADATA_DATA {
10090    fn default() -> Self {
10091        Self::DEFAULT.clone()
10092    }
10093}
10094impl MessageData for COMPONENT_METADATA_DATA {
10095    type Message = MavMessage;
10096    const ID: u32 = 397u32;
10097    const NAME: &'static str = "COMPONENT_METADATA";
10098    const EXTRA_CRC: u8 = 182u8;
10099    const ENCODED_LEN: usize = 108usize;
10100    fn deser(
10101        _version: MavlinkVersion,
10102        __input: &[u8],
10103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10104        let avail_len = __input.len();
10105        let mut payload_buf = [0; Self::ENCODED_LEN];
10106        let mut buf = if avail_len < Self::ENCODED_LEN {
10107            payload_buf[0..avail_len].copy_from_slice(__input);
10108            Bytes::new(&payload_buf)
10109        } else {
10110            Bytes::new(__input)
10111        };
10112        let mut __struct = Self::default();
10113        __struct.time_boot_ms = buf.get_u32_le();
10114        __struct.file_crc = buf.get_u32_le();
10115        let mut tmp = [0_u8; 100usize];
10116        for v in &mut tmp {
10117            *v = buf.get_u8();
10118        }
10119        __struct.uri = CharArray::new(tmp);
10120        Ok(__struct)
10121    }
10122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10123        let mut __tmp = BytesMut::new(bytes);
10124        #[allow(clippy::absurd_extreme_comparisons)]
10125        #[allow(unused_comparisons)]
10126        if __tmp.remaining() < Self::ENCODED_LEN {
10127            panic!(
10128                "buffer is too small (need {} bytes, but got {})",
10129                Self::ENCODED_LEN,
10130                __tmp.remaining(),
10131            )
10132        }
10133        __tmp.put_u32_le(self.time_boot_ms);
10134        __tmp.put_u32_le(self.file_crc);
10135        for val in &self.uri {
10136            __tmp.put_u8(*val);
10137        }
10138        if matches!(version, MavlinkVersion::V2) {
10139            let len = __tmp.len();
10140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10141        } else {
10142            __tmp.len()
10143        }
10144    }
10145}
10146#[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
10147#[doc = ""]
10148#[doc = "ID: 512"]
10149#[derive(Debug, Clone, PartialEq)]
10150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10152#[cfg_attr(feature = "ts", derive(TS))]
10153#[cfg_attr(feature = "ts", ts(export))]
10154pub struct CONTROL_STATUS_DATA {
10155    #[doc = "System ID of GCS MAVLink component in control (0: no GCS in control)."]
10156    pub sysid_in_control: u8,
10157    #[doc = "Control status. For example, whether takeover is allowed, and whether this message instance defines the default controlling GCS for the whole system."]
10158    pub flags: GcsControlStatusFlags,
10159}
10160impl CONTROL_STATUS_DATA {
10161    pub const ENCODED_LEN: usize = 2usize;
10162    pub const DEFAULT: Self = Self {
10163        sysid_in_control: 0_u8,
10164        flags: GcsControlStatusFlags::DEFAULT,
10165    };
10166    #[cfg(feature = "arbitrary")]
10167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10168        use arbitrary::{Arbitrary, Unstructured};
10169        let mut buf = [0u8; 1024];
10170        rng.fill_bytes(&mut buf);
10171        let mut unstructured = Unstructured::new(&buf);
10172        Self::arbitrary(&mut unstructured).unwrap_or_default()
10173    }
10174}
10175impl Default for CONTROL_STATUS_DATA {
10176    fn default() -> Self {
10177        Self::DEFAULT.clone()
10178    }
10179}
10180impl MessageData for CONTROL_STATUS_DATA {
10181    type Message = MavMessage;
10182    const ID: u32 = 512u32;
10183    const NAME: &'static str = "CONTROL_STATUS";
10184    const EXTRA_CRC: u8 = 184u8;
10185    const ENCODED_LEN: usize = 2usize;
10186    fn deser(
10187        _version: MavlinkVersion,
10188        __input: &[u8],
10189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10190        let avail_len = __input.len();
10191        let mut payload_buf = [0; Self::ENCODED_LEN];
10192        let mut buf = if avail_len < Self::ENCODED_LEN {
10193            payload_buf[0..avail_len].copy_from_slice(__input);
10194            Bytes::new(&payload_buf)
10195        } else {
10196            Bytes::new(__input)
10197        };
10198        let mut __struct = Self::default();
10199        __struct.sysid_in_control = buf.get_u8();
10200        let tmp = buf.get_u8();
10201        __struct.flags = GcsControlStatusFlags::from_bits(tmp).ok_or(
10202            ::mavlink_core::error::ParserError::InvalidFlag {
10203                flag_type: "GcsControlStatusFlags",
10204                value: tmp as u64,
10205            },
10206        )?;
10207        Ok(__struct)
10208    }
10209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10210        let mut __tmp = BytesMut::new(bytes);
10211        #[allow(clippy::absurd_extreme_comparisons)]
10212        #[allow(unused_comparisons)]
10213        if __tmp.remaining() < Self::ENCODED_LEN {
10214            panic!(
10215                "buffer is too small (need {} bytes, but got {})",
10216                Self::ENCODED_LEN,
10217                __tmp.remaining(),
10218            )
10219        }
10220        __tmp.put_u8(self.sysid_in_control);
10221        __tmp.put_u8(self.flags.bits());
10222        if matches!(version, MavlinkVersion::V2) {
10223            let len = __tmp.len();
10224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10225        } else {
10226            __tmp.len()
10227        }
10228    }
10229}
10230#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10231#[doc = ""]
10232#[doc = "ID: 146"]
10233#[derive(Debug, Clone, PartialEq)]
10234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10236#[cfg_attr(feature = "ts", derive(TS))]
10237#[cfg_attr(feature = "ts", ts(export))]
10238pub struct CONTROL_SYSTEM_STATE_DATA {
10239    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10240    pub time_usec: u64,
10241    #[doc = "X acceleration in body frame"]
10242    pub x_acc: f32,
10243    #[doc = "Y acceleration in body frame"]
10244    pub y_acc: f32,
10245    #[doc = "Z acceleration in body frame"]
10246    pub z_acc: f32,
10247    #[doc = "X velocity in body frame"]
10248    pub x_vel: f32,
10249    #[doc = "Y velocity in body frame"]
10250    pub y_vel: f32,
10251    #[doc = "Z velocity in body frame"]
10252    pub z_vel: f32,
10253    #[doc = "X position in local frame"]
10254    pub x_pos: f32,
10255    #[doc = "Y position in local frame"]
10256    pub y_pos: f32,
10257    #[doc = "Z position in local frame"]
10258    pub z_pos: f32,
10259    #[doc = "Airspeed, set to -1 if unknown"]
10260    pub airspeed: f32,
10261    #[doc = "Variance of body velocity estimate"]
10262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10263    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10264    pub vel_variance: [f32; 3],
10265    #[doc = "Variance in local position"]
10266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10267    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10268    pub pos_variance: [f32; 3],
10269    #[doc = "The attitude, represented as Quaternion"]
10270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10271    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10272    pub q: [f32; 4],
10273    #[doc = "Angular rate in roll axis"]
10274    pub roll_rate: f32,
10275    #[doc = "Angular rate in pitch axis"]
10276    pub pitch_rate: f32,
10277    #[doc = "Angular rate in yaw axis"]
10278    pub yaw_rate: f32,
10279}
10280impl CONTROL_SYSTEM_STATE_DATA {
10281    pub const ENCODED_LEN: usize = 100usize;
10282    pub const DEFAULT: Self = Self {
10283        time_usec: 0_u64,
10284        x_acc: 0.0_f32,
10285        y_acc: 0.0_f32,
10286        z_acc: 0.0_f32,
10287        x_vel: 0.0_f32,
10288        y_vel: 0.0_f32,
10289        z_vel: 0.0_f32,
10290        x_pos: 0.0_f32,
10291        y_pos: 0.0_f32,
10292        z_pos: 0.0_f32,
10293        airspeed: 0.0_f32,
10294        vel_variance: [0.0_f32; 3usize],
10295        pos_variance: [0.0_f32; 3usize],
10296        q: [0.0_f32; 4usize],
10297        roll_rate: 0.0_f32,
10298        pitch_rate: 0.0_f32,
10299        yaw_rate: 0.0_f32,
10300    };
10301    #[cfg(feature = "arbitrary")]
10302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10303        use arbitrary::{Arbitrary, Unstructured};
10304        let mut buf = [0u8; 1024];
10305        rng.fill_bytes(&mut buf);
10306        let mut unstructured = Unstructured::new(&buf);
10307        Self::arbitrary(&mut unstructured).unwrap_or_default()
10308    }
10309}
10310impl Default for CONTROL_SYSTEM_STATE_DATA {
10311    fn default() -> Self {
10312        Self::DEFAULT.clone()
10313    }
10314}
10315impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10316    type Message = MavMessage;
10317    const ID: u32 = 146u32;
10318    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10319    const EXTRA_CRC: u8 = 103u8;
10320    const ENCODED_LEN: usize = 100usize;
10321    fn deser(
10322        _version: MavlinkVersion,
10323        __input: &[u8],
10324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10325        let avail_len = __input.len();
10326        let mut payload_buf = [0; Self::ENCODED_LEN];
10327        let mut buf = if avail_len < Self::ENCODED_LEN {
10328            payload_buf[0..avail_len].copy_from_slice(__input);
10329            Bytes::new(&payload_buf)
10330        } else {
10331            Bytes::new(__input)
10332        };
10333        let mut __struct = Self::default();
10334        __struct.time_usec = buf.get_u64_le();
10335        __struct.x_acc = buf.get_f32_le();
10336        __struct.y_acc = buf.get_f32_le();
10337        __struct.z_acc = buf.get_f32_le();
10338        __struct.x_vel = buf.get_f32_le();
10339        __struct.y_vel = buf.get_f32_le();
10340        __struct.z_vel = buf.get_f32_le();
10341        __struct.x_pos = buf.get_f32_le();
10342        __struct.y_pos = buf.get_f32_le();
10343        __struct.z_pos = buf.get_f32_le();
10344        __struct.airspeed = buf.get_f32_le();
10345        for v in &mut __struct.vel_variance {
10346            let val = buf.get_f32_le();
10347            *v = val;
10348        }
10349        for v in &mut __struct.pos_variance {
10350            let val = buf.get_f32_le();
10351            *v = val;
10352        }
10353        for v in &mut __struct.q {
10354            let val = buf.get_f32_le();
10355            *v = val;
10356        }
10357        __struct.roll_rate = buf.get_f32_le();
10358        __struct.pitch_rate = buf.get_f32_le();
10359        __struct.yaw_rate = buf.get_f32_le();
10360        Ok(__struct)
10361    }
10362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10363        let mut __tmp = BytesMut::new(bytes);
10364        #[allow(clippy::absurd_extreme_comparisons)]
10365        #[allow(unused_comparisons)]
10366        if __tmp.remaining() < Self::ENCODED_LEN {
10367            panic!(
10368                "buffer is too small (need {} bytes, but got {})",
10369                Self::ENCODED_LEN,
10370                __tmp.remaining(),
10371            )
10372        }
10373        __tmp.put_u64_le(self.time_usec);
10374        __tmp.put_f32_le(self.x_acc);
10375        __tmp.put_f32_le(self.y_acc);
10376        __tmp.put_f32_le(self.z_acc);
10377        __tmp.put_f32_le(self.x_vel);
10378        __tmp.put_f32_le(self.y_vel);
10379        __tmp.put_f32_le(self.z_vel);
10380        __tmp.put_f32_le(self.x_pos);
10381        __tmp.put_f32_le(self.y_pos);
10382        __tmp.put_f32_le(self.z_pos);
10383        __tmp.put_f32_le(self.airspeed);
10384        for val in &self.vel_variance {
10385            __tmp.put_f32_le(*val);
10386        }
10387        for val in &self.pos_variance {
10388            __tmp.put_f32_le(*val);
10389        }
10390        for val in &self.q {
10391            __tmp.put_f32_le(*val);
10392        }
10393        __tmp.put_f32_le(self.roll_rate);
10394        __tmp.put_f32_le(self.pitch_rate);
10395        __tmp.put_f32_le(self.yaw_rate);
10396        if matches!(version, MavlinkVersion::V2) {
10397            let len = __tmp.len();
10398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10399        } else {
10400            __tmp.len()
10401        }
10402    }
10403}
10404#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10405#[doc = ""]
10406#[doc = "ID: 411"]
10407#[derive(Debug, Clone, PartialEq)]
10408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10410#[cfg_attr(feature = "ts", derive(TS))]
10411#[cfg_attr(feature = "ts", ts(export))]
10412pub struct CURRENT_EVENT_SEQUENCE_DATA {
10413    #[doc = "Sequence number."]
10414    pub sequence: u16,
10415    #[doc = "Flag bitset."]
10416    pub flags: MavEventCurrentSequenceFlags,
10417}
10418impl CURRENT_EVENT_SEQUENCE_DATA {
10419    pub const ENCODED_LEN: usize = 3usize;
10420    pub const DEFAULT: Self = Self {
10421        sequence: 0_u16,
10422        flags: MavEventCurrentSequenceFlags::DEFAULT,
10423    };
10424    #[cfg(feature = "arbitrary")]
10425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10426        use arbitrary::{Arbitrary, Unstructured};
10427        let mut buf = [0u8; 1024];
10428        rng.fill_bytes(&mut buf);
10429        let mut unstructured = Unstructured::new(&buf);
10430        Self::arbitrary(&mut unstructured).unwrap_or_default()
10431    }
10432}
10433impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10434    fn default() -> Self {
10435        Self::DEFAULT.clone()
10436    }
10437}
10438impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10439    type Message = MavMessage;
10440    const ID: u32 = 411u32;
10441    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10442    const EXTRA_CRC: u8 = 106u8;
10443    const ENCODED_LEN: usize = 3usize;
10444    fn deser(
10445        _version: MavlinkVersion,
10446        __input: &[u8],
10447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10448        let avail_len = __input.len();
10449        let mut payload_buf = [0; Self::ENCODED_LEN];
10450        let mut buf = if avail_len < Self::ENCODED_LEN {
10451            payload_buf[0..avail_len].copy_from_slice(__input);
10452            Bytes::new(&payload_buf)
10453        } else {
10454            Bytes::new(__input)
10455        };
10456        let mut __struct = Self::default();
10457        __struct.sequence = buf.get_u16_le();
10458        let tmp = buf.get_u8();
10459        __struct.flags =
10460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10461                enum_type: "MavEventCurrentSequenceFlags",
10462                value: tmp as u64,
10463            })?;
10464        Ok(__struct)
10465    }
10466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10467        let mut __tmp = BytesMut::new(bytes);
10468        #[allow(clippy::absurd_extreme_comparisons)]
10469        #[allow(unused_comparisons)]
10470        if __tmp.remaining() < Self::ENCODED_LEN {
10471            panic!(
10472                "buffer is too small (need {} bytes, but got {})",
10473                Self::ENCODED_LEN,
10474                __tmp.remaining(),
10475            )
10476        }
10477        __tmp.put_u16_le(self.sequence);
10478        __tmp.put_u8(self.flags as u8);
10479        if matches!(version, MavlinkVersion::V2) {
10480            let len = __tmp.len();
10481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10482        } else {
10483            __tmp.len()
10484        }
10485    }
10486}
10487#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10488#[doc = ""]
10489#[doc = "ID: 436"]
10490#[derive(Debug, Clone, PartialEq)]
10491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10493#[cfg_attr(feature = "ts", derive(TS))]
10494#[cfg_attr(feature = "ts", ts(export))]
10495pub struct CURRENT_MODE_DATA {
10496    #[doc = "A bitfield for use for autopilot-specific flags"]
10497    pub custom_mode: u32,
10498    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10499    pub intended_custom_mode: u32,
10500    #[doc = "Standard mode."]
10501    pub standard_mode: MavStandardMode,
10502}
10503impl CURRENT_MODE_DATA {
10504    pub const ENCODED_LEN: usize = 9usize;
10505    pub const DEFAULT: Self = Self {
10506        custom_mode: 0_u32,
10507        intended_custom_mode: 0_u32,
10508        standard_mode: MavStandardMode::DEFAULT,
10509    };
10510    #[cfg(feature = "arbitrary")]
10511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10512        use arbitrary::{Arbitrary, Unstructured};
10513        let mut buf = [0u8; 1024];
10514        rng.fill_bytes(&mut buf);
10515        let mut unstructured = Unstructured::new(&buf);
10516        Self::arbitrary(&mut unstructured).unwrap_or_default()
10517    }
10518}
10519impl Default for CURRENT_MODE_DATA {
10520    fn default() -> Self {
10521        Self::DEFAULT.clone()
10522    }
10523}
10524impl MessageData for CURRENT_MODE_DATA {
10525    type Message = MavMessage;
10526    const ID: u32 = 436u32;
10527    const NAME: &'static str = "CURRENT_MODE";
10528    const EXTRA_CRC: u8 = 193u8;
10529    const ENCODED_LEN: usize = 9usize;
10530    fn deser(
10531        _version: MavlinkVersion,
10532        __input: &[u8],
10533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10534        let avail_len = __input.len();
10535        let mut payload_buf = [0; Self::ENCODED_LEN];
10536        let mut buf = if avail_len < Self::ENCODED_LEN {
10537            payload_buf[0..avail_len].copy_from_slice(__input);
10538            Bytes::new(&payload_buf)
10539        } else {
10540            Bytes::new(__input)
10541        };
10542        let mut __struct = Self::default();
10543        __struct.custom_mode = buf.get_u32_le();
10544        __struct.intended_custom_mode = buf.get_u32_le();
10545        let tmp = buf.get_u8();
10546        __struct.standard_mode =
10547            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10548                enum_type: "MavStandardMode",
10549                value: tmp as u64,
10550            })?;
10551        Ok(__struct)
10552    }
10553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10554        let mut __tmp = BytesMut::new(bytes);
10555        #[allow(clippy::absurd_extreme_comparisons)]
10556        #[allow(unused_comparisons)]
10557        if __tmp.remaining() < Self::ENCODED_LEN {
10558            panic!(
10559                "buffer is too small (need {} bytes, but got {})",
10560                Self::ENCODED_LEN,
10561                __tmp.remaining(),
10562            )
10563        }
10564        __tmp.put_u32_le(self.custom_mode);
10565        __tmp.put_u32_le(self.intended_custom_mode);
10566        __tmp.put_u8(self.standard_mode as u8);
10567        if matches!(version, MavlinkVersion::V2) {
10568            let len = __tmp.len();
10569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10570        } else {
10571            __tmp.len()
10572        }
10573    }
10574}
10575#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10576#[doc = "Data stream status information."]
10577#[doc = ""]
10578#[doc = "ID: 67"]
10579#[derive(Debug, Clone, PartialEq)]
10580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10582#[cfg_attr(feature = "ts", derive(TS))]
10583#[cfg_attr(feature = "ts", ts(export))]
10584pub struct DATA_STREAM_DATA {
10585    #[doc = "The message rate"]
10586    pub message_rate: u16,
10587    #[doc = "The ID of the requested data stream"]
10588    pub stream_id: u8,
10589    #[doc = "1 stream is enabled, 0 stream is stopped."]
10590    pub on_off: u8,
10591}
10592impl DATA_STREAM_DATA {
10593    pub const ENCODED_LEN: usize = 4usize;
10594    pub const DEFAULT: Self = Self {
10595        message_rate: 0_u16,
10596        stream_id: 0_u8,
10597        on_off: 0_u8,
10598    };
10599    #[cfg(feature = "arbitrary")]
10600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10601        use arbitrary::{Arbitrary, Unstructured};
10602        let mut buf = [0u8; 1024];
10603        rng.fill_bytes(&mut buf);
10604        let mut unstructured = Unstructured::new(&buf);
10605        Self::arbitrary(&mut unstructured).unwrap_or_default()
10606    }
10607}
10608impl Default for DATA_STREAM_DATA {
10609    fn default() -> Self {
10610        Self::DEFAULT.clone()
10611    }
10612}
10613impl MessageData for DATA_STREAM_DATA {
10614    type Message = MavMessage;
10615    const ID: u32 = 67u32;
10616    const NAME: &'static str = "DATA_STREAM";
10617    const EXTRA_CRC: u8 = 21u8;
10618    const ENCODED_LEN: usize = 4usize;
10619    fn deser(
10620        _version: MavlinkVersion,
10621        __input: &[u8],
10622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10623        let avail_len = __input.len();
10624        let mut payload_buf = [0; Self::ENCODED_LEN];
10625        let mut buf = if avail_len < Self::ENCODED_LEN {
10626            payload_buf[0..avail_len].copy_from_slice(__input);
10627            Bytes::new(&payload_buf)
10628        } else {
10629            Bytes::new(__input)
10630        };
10631        let mut __struct = Self::default();
10632        __struct.message_rate = buf.get_u16_le();
10633        __struct.stream_id = buf.get_u8();
10634        __struct.on_off = buf.get_u8();
10635        Ok(__struct)
10636    }
10637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10638        let mut __tmp = BytesMut::new(bytes);
10639        #[allow(clippy::absurd_extreme_comparisons)]
10640        #[allow(unused_comparisons)]
10641        if __tmp.remaining() < Self::ENCODED_LEN {
10642            panic!(
10643                "buffer is too small (need {} bytes, but got {})",
10644                Self::ENCODED_LEN,
10645                __tmp.remaining(),
10646            )
10647        }
10648        __tmp.put_u16_le(self.message_rate);
10649        __tmp.put_u8(self.stream_id);
10650        __tmp.put_u8(self.on_off);
10651        if matches!(version, MavlinkVersion::V2) {
10652            let len = __tmp.len();
10653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10654        } else {
10655            __tmp.len()
10656        }
10657    }
10658}
10659#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10660#[doc = ""]
10661#[doc = "ID: 130"]
10662#[derive(Debug, Clone, PartialEq)]
10663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10665#[cfg_attr(feature = "ts", derive(TS))]
10666#[cfg_attr(feature = "ts", ts(export))]
10667pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10668    #[doc = "total data size (set on ACK only)."]
10669    pub size: u32,
10670    #[doc = "Width of a matrix or image."]
10671    pub width: u16,
10672    #[doc = "Height of a matrix or image."]
10673    pub height: u16,
10674    #[doc = "Number of packets being sent (set on ACK only)."]
10675    pub packets: u16,
10676    #[doc = "Type of requested/acknowledged data."]
10677    pub mavtype: MavlinkDataStreamType,
10678    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10679    pub payload: u8,
10680    #[doc = "JPEG quality. Values: [1-100]."]
10681    pub jpg_quality: u8,
10682}
10683impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10684    pub const ENCODED_LEN: usize = 13usize;
10685    pub const DEFAULT: Self = Self {
10686        size: 0_u32,
10687        width: 0_u16,
10688        height: 0_u16,
10689        packets: 0_u16,
10690        mavtype: MavlinkDataStreamType::DEFAULT,
10691        payload: 0_u8,
10692        jpg_quality: 0_u8,
10693    };
10694    #[cfg(feature = "arbitrary")]
10695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10696        use arbitrary::{Arbitrary, Unstructured};
10697        let mut buf = [0u8; 1024];
10698        rng.fill_bytes(&mut buf);
10699        let mut unstructured = Unstructured::new(&buf);
10700        Self::arbitrary(&mut unstructured).unwrap_or_default()
10701    }
10702}
10703impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10704    fn default() -> Self {
10705        Self::DEFAULT.clone()
10706    }
10707}
10708impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10709    type Message = MavMessage;
10710    const ID: u32 = 130u32;
10711    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10712    const EXTRA_CRC: u8 = 29u8;
10713    const ENCODED_LEN: usize = 13usize;
10714    fn deser(
10715        _version: MavlinkVersion,
10716        __input: &[u8],
10717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10718        let avail_len = __input.len();
10719        let mut payload_buf = [0; Self::ENCODED_LEN];
10720        let mut buf = if avail_len < Self::ENCODED_LEN {
10721            payload_buf[0..avail_len].copy_from_slice(__input);
10722            Bytes::new(&payload_buf)
10723        } else {
10724            Bytes::new(__input)
10725        };
10726        let mut __struct = Self::default();
10727        __struct.size = buf.get_u32_le();
10728        __struct.width = buf.get_u16_le();
10729        __struct.height = buf.get_u16_le();
10730        __struct.packets = buf.get_u16_le();
10731        let tmp = buf.get_u8();
10732        __struct.mavtype =
10733            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10734                enum_type: "MavlinkDataStreamType",
10735                value: tmp as u64,
10736            })?;
10737        __struct.payload = buf.get_u8();
10738        __struct.jpg_quality = buf.get_u8();
10739        Ok(__struct)
10740    }
10741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10742        let mut __tmp = BytesMut::new(bytes);
10743        #[allow(clippy::absurd_extreme_comparisons)]
10744        #[allow(unused_comparisons)]
10745        if __tmp.remaining() < Self::ENCODED_LEN {
10746            panic!(
10747                "buffer is too small (need {} bytes, but got {})",
10748                Self::ENCODED_LEN,
10749                __tmp.remaining(),
10750            )
10751        }
10752        __tmp.put_u32_le(self.size);
10753        __tmp.put_u16_le(self.width);
10754        __tmp.put_u16_le(self.height);
10755        __tmp.put_u16_le(self.packets);
10756        __tmp.put_u8(self.mavtype as u8);
10757        __tmp.put_u8(self.payload);
10758        __tmp.put_u8(self.jpg_quality);
10759        if matches!(version, MavlinkVersion::V2) {
10760            let len = __tmp.len();
10761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10762        } else {
10763            __tmp.len()
10764        }
10765    }
10766}
10767#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10768#[doc = ""]
10769#[doc = "ID: 254"]
10770#[derive(Debug, Clone, PartialEq)]
10771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10773#[cfg_attr(feature = "ts", derive(TS))]
10774#[cfg_attr(feature = "ts", ts(export))]
10775pub struct DEBUG_DATA {
10776    #[doc = "Timestamp (time since system boot)."]
10777    pub time_boot_ms: u32,
10778    #[doc = "DEBUG value"]
10779    pub value: f32,
10780    #[doc = "index of debug variable"]
10781    pub ind: u8,
10782}
10783impl DEBUG_DATA {
10784    pub const ENCODED_LEN: usize = 9usize;
10785    pub const DEFAULT: Self = Self {
10786        time_boot_ms: 0_u32,
10787        value: 0.0_f32,
10788        ind: 0_u8,
10789    };
10790    #[cfg(feature = "arbitrary")]
10791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10792        use arbitrary::{Arbitrary, Unstructured};
10793        let mut buf = [0u8; 1024];
10794        rng.fill_bytes(&mut buf);
10795        let mut unstructured = Unstructured::new(&buf);
10796        Self::arbitrary(&mut unstructured).unwrap_or_default()
10797    }
10798}
10799impl Default for DEBUG_DATA {
10800    fn default() -> Self {
10801        Self::DEFAULT.clone()
10802    }
10803}
10804impl MessageData for DEBUG_DATA {
10805    type Message = MavMessage;
10806    const ID: u32 = 254u32;
10807    const NAME: &'static str = "DEBUG";
10808    const EXTRA_CRC: u8 = 46u8;
10809    const ENCODED_LEN: usize = 9usize;
10810    fn deser(
10811        _version: MavlinkVersion,
10812        __input: &[u8],
10813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10814        let avail_len = __input.len();
10815        let mut payload_buf = [0; Self::ENCODED_LEN];
10816        let mut buf = if avail_len < Self::ENCODED_LEN {
10817            payload_buf[0..avail_len].copy_from_slice(__input);
10818            Bytes::new(&payload_buf)
10819        } else {
10820            Bytes::new(__input)
10821        };
10822        let mut __struct = Self::default();
10823        __struct.time_boot_ms = buf.get_u32_le();
10824        __struct.value = buf.get_f32_le();
10825        __struct.ind = buf.get_u8();
10826        Ok(__struct)
10827    }
10828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10829        let mut __tmp = BytesMut::new(bytes);
10830        #[allow(clippy::absurd_extreme_comparisons)]
10831        #[allow(unused_comparisons)]
10832        if __tmp.remaining() < Self::ENCODED_LEN {
10833            panic!(
10834                "buffer is too small (need {} bytes, but got {})",
10835                Self::ENCODED_LEN,
10836                __tmp.remaining(),
10837            )
10838        }
10839        __tmp.put_u32_le(self.time_boot_ms);
10840        __tmp.put_f32_le(self.value);
10841        __tmp.put_u8(self.ind);
10842        if matches!(version, MavlinkVersion::V2) {
10843            let len = __tmp.len();
10844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10845        } else {
10846            __tmp.len()
10847        }
10848    }
10849}
10850#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10851#[doc = ""]
10852#[doc = "ID: 350"]
10853#[derive(Debug, Clone, PartialEq)]
10854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10856#[cfg_attr(feature = "ts", derive(TS))]
10857#[cfg_attr(feature = "ts", ts(export))]
10858pub struct DEBUG_FLOAT_ARRAY_DATA {
10859    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10860    pub time_usec: u64,
10861    #[doc = "Unique ID used to discriminate between arrays"]
10862    pub array_id: u16,
10863    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10864    #[cfg_attr(feature = "ts", ts(type = "string"))]
10865    pub name: CharArray<10>,
10866    #[doc = "data"]
10867    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10869    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10870    pub data: [f32; 58],
10871}
10872impl DEBUG_FLOAT_ARRAY_DATA {
10873    pub const ENCODED_LEN: usize = 252usize;
10874    pub const DEFAULT: Self = Self {
10875        time_usec: 0_u64,
10876        array_id: 0_u16,
10877        name: CharArray::new([0_u8; 10usize]),
10878        data: [0.0_f32; 58usize],
10879    };
10880    #[cfg(feature = "arbitrary")]
10881    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10882        use arbitrary::{Arbitrary, Unstructured};
10883        let mut buf = [0u8; 1024];
10884        rng.fill_bytes(&mut buf);
10885        let mut unstructured = Unstructured::new(&buf);
10886        Self::arbitrary(&mut unstructured).unwrap_or_default()
10887    }
10888}
10889impl Default for DEBUG_FLOAT_ARRAY_DATA {
10890    fn default() -> Self {
10891        Self::DEFAULT.clone()
10892    }
10893}
10894impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10895    type Message = MavMessage;
10896    const ID: u32 = 350u32;
10897    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10898    const EXTRA_CRC: u8 = 232u8;
10899    const ENCODED_LEN: usize = 252usize;
10900    fn deser(
10901        _version: MavlinkVersion,
10902        __input: &[u8],
10903    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10904        let avail_len = __input.len();
10905        let mut payload_buf = [0; Self::ENCODED_LEN];
10906        let mut buf = if avail_len < Self::ENCODED_LEN {
10907            payload_buf[0..avail_len].copy_from_slice(__input);
10908            Bytes::new(&payload_buf)
10909        } else {
10910            Bytes::new(__input)
10911        };
10912        let mut __struct = Self::default();
10913        __struct.time_usec = buf.get_u64_le();
10914        __struct.array_id = buf.get_u16_le();
10915        let mut tmp = [0_u8; 10usize];
10916        for v in &mut tmp {
10917            *v = buf.get_u8();
10918        }
10919        __struct.name = CharArray::new(tmp);
10920        for v in &mut __struct.data {
10921            let val = buf.get_f32_le();
10922            *v = val;
10923        }
10924        Ok(__struct)
10925    }
10926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10927        let mut __tmp = BytesMut::new(bytes);
10928        #[allow(clippy::absurd_extreme_comparisons)]
10929        #[allow(unused_comparisons)]
10930        if __tmp.remaining() < Self::ENCODED_LEN {
10931            panic!(
10932                "buffer is too small (need {} bytes, but got {})",
10933                Self::ENCODED_LEN,
10934                __tmp.remaining(),
10935            )
10936        }
10937        __tmp.put_u64_le(self.time_usec);
10938        __tmp.put_u16_le(self.array_id);
10939        for val in &self.name {
10940            __tmp.put_u8(*val);
10941        }
10942        if matches!(version, MavlinkVersion::V2) {
10943            for val in &self.data {
10944                __tmp.put_f32_le(*val);
10945            }
10946            let len = __tmp.len();
10947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10948        } else {
10949            __tmp.len()
10950        }
10951    }
10952}
10953#[doc = "To debug something using a named 3D vector."]
10954#[doc = ""]
10955#[doc = "ID: 250"]
10956#[derive(Debug, Clone, PartialEq)]
10957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10959#[cfg_attr(feature = "ts", derive(TS))]
10960#[cfg_attr(feature = "ts", ts(export))]
10961pub struct DEBUG_VECT_DATA {
10962    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10963    pub time_usec: u64,
10964    #[doc = "x"]
10965    pub x: f32,
10966    #[doc = "y"]
10967    pub y: f32,
10968    #[doc = "z"]
10969    pub z: f32,
10970    #[doc = "Name"]
10971    #[cfg_attr(feature = "ts", ts(type = "string"))]
10972    pub name: CharArray<10>,
10973}
10974impl DEBUG_VECT_DATA {
10975    pub const ENCODED_LEN: usize = 30usize;
10976    pub const DEFAULT: Self = Self {
10977        time_usec: 0_u64,
10978        x: 0.0_f32,
10979        y: 0.0_f32,
10980        z: 0.0_f32,
10981        name: CharArray::new([0_u8; 10usize]),
10982    };
10983    #[cfg(feature = "arbitrary")]
10984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10985        use arbitrary::{Arbitrary, Unstructured};
10986        let mut buf = [0u8; 1024];
10987        rng.fill_bytes(&mut buf);
10988        let mut unstructured = Unstructured::new(&buf);
10989        Self::arbitrary(&mut unstructured).unwrap_or_default()
10990    }
10991}
10992impl Default for DEBUG_VECT_DATA {
10993    fn default() -> Self {
10994        Self::DEFAULT.clone()
10995    }
10996}
10997impl MessageData for DEBUG_VECT_DATA {
10998    type Message = MavMessage;
10999    const ID: u32 = 250u32;
11000    const NAME: &'static str = "DEBUG_VECT";
11001    const EXTRA_CRC: u8 = 49u8;
11002    const ENCODED_LEN: usize = 30usize;
11003    fn deser(
11004        _version: MavlinkVersion,
11005        __input: &[u8],
11006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11007        let avail_len = __input.len();
11008        let mut payload_buf = [0; Self::ENCODED_LEN];
11009        let mut buf = if avail_len < Self::ENCODED_LEN {
11010            payload_buf[0..avail_len].copy_from_slice(__input);
11011            Bytes::new(&payload_buf)
11012        } else {
11013            Bytes::new(__input)
11014        };
11015        let mut __struct = Self::default();
11016        __struct.time_usec = buf.get_u64_le();
11017        __struct.x = buf.get_f32_le();
11018        __struct.y = buf.get_f32_le();
11019        __struct.z = buf.get_f32_le();
11020        let mut tmp = [0_u8; 10usize];
11021        for v in &mut tmp {
11022            *v = buf.get_u8();
11023        }
11024        __struct.name = CharArray::new(tmp);
11025        Ok(__struct)
11026    }
11027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11028        let mut __tmp = BytesMut::new(bytes);
11029        #[allow(clippy::absurd_extreme_comparisons)]
11030        #[allow(unused_comparisons)]
11031        if __tmp.remaining() < Self::ENCODED_LEN {
11032            panic!(
11033                "buffer is too small (need {} bytes, but got {})",
11034                Self::ENCODED_LEN,
11035                __tmp.remaining(),
11036            )
11037        }
11038        __tmp.put_u64_le(self.time_usec);
11039        __tmp.put_f32_le(self.x);
11040        __tmp.put_f32_le(self.y);
11041        __tmp.put_f32_le(self.z);
11042        for val in &self.name {
11043            __tmp.put_u8(*val);
11044        }
11045        if matches!(version, MavlinkVersion::V2) {
11046            let len = __tmp.len();
11047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11048        } else {
11049            __tmp.len()
11050        }
11051    }
11052}
11053#[doc = "Distance sensor information for an onboard rangefinder."]
11054#[doc = ""]
11055#[doc = "ID: 132"]
11056#[derive(Debug, Clone, PartialEq)]
11057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11059#[cfg_attr(feature = "ts", derive(TS))]
11060#[cfg_attr(feature = "ts", ts(export))]
11061pub struct DISTANCE_SENSOR_DATA {
11062    #[doc = "Timestamp (time since system boot)."]
11063    pub time_boot_ms: u32,
11064    #[doc = "Minimum distance the sensor can measure"]
11065    pub min_distance: u16,
11066    #[doc = "Maximum distance the sensor can measure"]
11067    pub max_distance: u16,
11068    #[doc = "Current distance reading"]
11069    pub current_distance: u16,
11070    #[doc = "Type of distance sensor."]
11071    pub mavtype: MavDistanceSensor,
11072    #[doc = "Onboard ID of the sensor"]
11073    pub id: u8,
11074    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11075    pub orientation: MavSensorOrientation,
11076    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11077    pub covariance: u8,
11078    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11080    pub horizontal_fov: f32,
11081    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11083    pub vertical_fov: f32,
11084    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11087    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11088    pub quaternion: [f32; 4],
11089    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11091    pub signal_quality: u8,
11092}
11093impl DISTANCE_SENSOR_DATA {
11094    pub const ENCODED_LEN: usize = 39usize;
11095    pub const DEFAULT: Self = Self {
11096        time_boot_ms: 0_u32,
11097        min_distance: 0_u16,
11098        max_distance: 0_u16,
11099        current_distance: 0_u16,
11100        mavtype: MavDistanceSensor::DEFAULT,
11101        id: 0_u8,
11102        orientation: MavSensorOrientation::DEFAULT,
11103        covariance: 0_u8,
11104        horizontal_fov: 0.0_f32,
11105        vertical_fov: 0.0_f32,
11106        quaternion: [0.0_f32; 4usize],
11107        signal_quality: 0_u8,
11108    };
11109    #[cfg(feature = "arbitrary")]
11110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11111        use arbitrary::{Arbitrary, Unstructured};
11112        let mut buf = [0u8; 1024];
11113        rng.fill_bytes(&mut buf);
11114        let mut unstructured = Unstructured::new(&buf);
11115        Self::arbitrary(&mut unstructured).unwrap_or_default()
11116    }
11117}
11118impl Default for DISTANCE_SENSOR_DATA {
11119    fn default() -> Self {
11120        Self::DEFAULT.clone()
11121    }
11122}
11123impl MessageData for DISTANCE_SENSOR_DATA {
11124    type Message = MavMessage;
11125    const ID: u32 = 132u32;
11126    const NAME: &'static str = "DISTANCE_SENSOR";
11127    const EXTRA_CRC: u8 = 85u8;
11128    const ENCODED_LEN: usize = 39usize;
11129    fn deser(
11130        _version: MavlinkVersion,
11131        __input: &[u8],
11132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11133        let avail_len = __input.len();
11134        let mut payload_buf = [0; Self::ENCODED_LEN];
11135        let mut buf = if avail_len < Self::ENCODED_LEN {
11136            payload_buf[0..avail_len].copy_from_slice(__input);
11137            Bytes::new(&payload_buf)
11138        } else {
11139            Bytes::new(__input)
11140        };
11141        let mut __struct = Self::default();
11142        __struct.time_boot_ms = buf.get_u32_le();
11143        __struct.min_distance = buf.get_u16_le();
11144        __struct.max_distance = buf.get_u16_le();
11145        __struct.current_distance = buf.get_u16_le();
11146        let tmp = buf.get_u8();
11147        __struct.mavtype =
11148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11149                enum_type: "MavDistanceSensor",
11150                value: tmp as u64,
11151            })?;
11152        __struct.id = buf.get_u8();
11153        let tmp = buf.get_u8();
11154        __struct.orientation =
11155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11156                enum_type: "MavSensorOrientation",
11157                value: tmp as u64,
11158            })?;
11159        __struct.covariance = buf.get_u8();
11160        __struct.horizontal_fov = buf.get_f32_le();
11161        __struct.vertical_fov = buf.get_f32_le();
11162        for v in &mut __struct.quaternion {
11163            let val = buf.get_f32_le();
11164            *v = val;
11165        }
11166        __struct.signal_quality = buf.get_u8();
11167        Ok(__struct)
11168    }
11169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11170        let mut __tmp = BytesMut::new(bytes);
11171        #[allow(clippy::absurd_extreme_comparisons)]
11172        #[allow(unused_comparisons)]
11173        if __tmp.remaining() < Self::ENCODED_LEN {
11174            panic!(
11175                "buffer is too small (need {} bytes, but got {})",
11176                Self::ENCODED_LEN,
11177                __tmp.remaining(),
11178            )
11179        }
11180        __tmp.put_u32_le(self.time_boot_ms);
11181        __tmp.put_u16_le(self.min_distance);
11182        __tmp.put_u16_le(self.max_distance);
11183        __tmp.put_u16_le(self.current_distance);
11184        __tmp.put_u8(self.mavtype as u8);
11185        __tmp.put_u8(self.id);
11186        __tmp.put_u8(self.orientation as u8);
11187        __tmp.put_u8(self.covariance);
11188        if matches!(version, MavlinkVersion::V2) {
11189            __tmp.put_f32_le(self.horizontal_fov);
11190            __tmp.put_f32_le(self.vertical_fov);
11191            for val in &self.quaternion {
11192                __tmp.put_f32_le(*val);
11193            }
11194            __tmp.put_u8(self.signal_quality);
11195            let len = __tmp.len();
11196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11197        } else {
11198            __tmp.len()
11199        }
11200    }
11201}
11202#[doc = "EFI status output."]
11203#[doc = ""]
11204#[doc = "ID: 225"]
11205#[derive(Debug, Clone, PartialEq)]
11206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11208#[cfg_attr(feature = "ts", derive(TS))]
11209#[cfg_attr(feature = "ts", ts(export))]
11210pub struct EFI_STATUS_DATA {
11211    #[doc = "ECU index"]
11212    pub ecu_index: f32,
11213    #[doc = "RPM"]
11214    pub rpm: f32,
11215    #[doc = "Fuel consumed"]
11216    pub fuel_consumed: f32,
11217    #[doc = "Fuel flow rate"]
11218    pub fuel_flow: f32,
11219    #[doc = "Engine load"]
11220    pub engine_load: f32,
11221    #[doc = "Throttle position"]
11222    pub throttle_position: f32,
11223    #[doc = "Spark dwell time"]
11224    pub spark_dwell_time: f32,
11225    #[doc = "Barometric pressure"]
11226    pub barometric_pressure: f32,
11227    #[doc = "Intake manifold pressure("]
11228    pub intake_manifold_pressure: f32,
11229    #[doc = "Intake manifold temperature"]
11230    pub intake_manifold_temperature: f32,
11231    #[doc = "Cylinder head temperature"]
11232    pub cylinder_head_temperature: f32,
11233    #[doc = "Ignition timing (Crank angle degrees)"]
11234    pub ignition_timing: f32,
11235    #[doc = "Injection time"]
11236    pub injection_time: f32,
11237    #[doc = "Exhaust gas temperature"]
11238    pub exhaust_gas_temperature: f32,
11239    #[doc = "Output throttle"]
11240    pub throttle_out: f32,
11241    #[doc = "Pressure/temperature compensation"]
11242    pub pt_compensation: f32,
11243    #[doc = "EFI health status"]
11244    pub health: u8,
11245    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11247    pub ignition_voltage: f32,
11248    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11249    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11250    pub fuel_pressure: f32,
11251}
11252impl EFI_STATUS_DATA {
11253    pub const ENCODED_LEN: usize = 73usize;
11254    pub const DEFAULT: Self = Self {
11255        ecu_index: 0.0_f32,
11256        rpm: 0.0_f32,
11257        fuel_consumed: 0.0_f32,
11258        fuel_flow: 0.0_f32,
11259        engine_load: 0.0_f32,
11260        throttle_position: 0.0_f32,
11261        spark_dwell_time: 0.0_f32,
11262        barometric_pressure: 0.0_f32,
11263        intake_manifold_pressure: 0.0_f32,
11264        intake_manifold_temperature: 0.0_f32,
11265        cylinder_head_temperature: 0.0_f32,
11266        ignition_timing: 0.0_f32,
11267        injection_time: 0.0_f32,
11268        exhaust_gas_temperature: 0.0_f32,
11269        throttle_out: 0.0_f32,
11270        pt_compensation: 0.0_f32,
11271        health: 0_u8,
11272        ignition_voltage: 0.0_f32,
11273        fuel_pressure: 0.0_f32,
11274    };
11275    #[cfg(feature = "arbitrary")]
11276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11277        use arbitrary::{Arbitrary, Unstructured};
11278        let mut buf = [0u8; 1024];
11279        rng.fill_bytes(&mut buf);
11280        let mut unstructured = Unstructured::new(&buf);
11281        Self::arbitrary(&mut unstructured).unwrap_or_default()
11282    }
11283}
11284impl Default for EFI_STATUS_DATA {
11285    fn default() -> Self {
11286        Self::DEFAULT.clone()
11287    }
11288}
11289impl MessageData for EFI_STATUS_DATA {
11290    type Message = MavMessage;
11291    const ID: u32 = 225u32;
11292    const NAME: &'static str = "EFI_STATUS";
11293    const EXTRA_CRC: u8 = 208u8;
11294    const ENCODED_LEN: usize = 73usize;
11295    fn deser(
11296        _version: MavlinkVersion,
11297        __input: &[u8],
11298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11299        let avail_len = __input.len();
11300        let mut payload_buf = [0; Self::ENCODED_LEN];
11301        let mut buf = if avail_len < Self::ENCODED_LEN {
11302            payload_buf[0..avail_len].copy_from_slice(__input);
11303            Bytes::new(&payload_buf)
11304        } else {
11305            Bytes::new(__input)
11306        };
11307        let mut __struct = Self::default();
11308        __struct.ecu_index = buf.get_f32_le();
11309        __struct.rpm = buf.get_f32_le();
11310        __struct.fuel_consumed = buf.get_f32_le();
11311        __struct.fuel_flow = buf.get_f32_le();
11312        __struct.engine_load = buf.get_f32_le();
11313        __struct.throttle_position = buf.get_f32_le();
11314        __struct.spark_dwell_time = buf.get_f32_le();
11315        __struct.barometric_pressure = buf.get_f32_le();
11316        __struct.intake_manifold_pressure = buf.get_f32_le();
11317        __struct.intake_manifold_temperature = buf.get_f32_le();
11318        __struct.cylinder_head_temperature = buf.get_f32_le();
11319        __struct.ignition_timing = buf.get_f32_le();
11320        __struct.injection_time = buf.get_f32_le();
11321        __struct.exhaust_gas_temperature = buf.get_f32_le();
11322        __struct.throttle_out = buf.get_f32_le();
11323        __struct.pt_compensation = buf.get_f32_le();
11324        __struct.health = buf.get_u8();
11325        __struct.ignition_voltage = buf.get_f32_le();
11326        __struct.fuel_pressure = buf.get_f32_le();
11327        Ok(__struct)
11328    }
11329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11330        let mut __tmp = BytesMut::new(bytes);
11331        #[allow(clippy::absurd_extreme_comparisons)]
11332        #[allow(unused_comparisons)]
11333        if __tmp.remaining() < Self::ENCODED_LEN {
11334            panic!(
11335                "buffer is too small (need {} bytes, but got {})",
11336                Self::ENCODED_LEN,
11337                __tmp.remaining(),
11338            )
11339        }
11340        __tmp.put_f32_le(self.ecu_index);
11341        __tmp.put_f32_le(self.rpm);
11342        __tmp.put_f32_le(self.fuel_consumed);
11343        __tmp.put_f32_le(self.fuel_flow);
11344        __tmp.put_f32_le(self.engine_load);
11345        __tmp.put_f32_le(self.throttle_position);
11346        __tmp.put_f32_le(self.spark_dwell_time);
11347        __tmp.put_f32_le(self.barometric_pressure);
11348        __tmp.put_f32_le(self.intake_manifold_pressure);
11349        __tmp.put_f32_le(self.intake_manifold_temperature);
11350        __tmp.put_f32_le(self.cylinder_head_temperature);
11351        __tmp.put_f32_le(self.ignition_timing);
11352        __tmp.put_f32_le(self.injection_time);
11353        __tmp.put_f32_le(self.exhaust_gas_temperature);
11354        __tmp.put_f32_le(self.throttle_out);
11355        __tmp.put_f32_le(self.pt_compensation);
11356        __tmp.put_u8(self.health);
11357        if matches!(version, MavlinkVersion::V2) {
11358            __tmp.put_f32_le(self.ignition_voltage);
11359            __tmp.put_f32_le(self.fuel_pressure);
11360            let len = __tmp.len();
11361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11362        } else {
11363            __tmp.len()
11364        }
11365    }
11366}
11367#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11368#[doc = ""]
11369#[doc = "ID: 131"]
11370#[derive(Debug, Clone, PartialEq)]
11371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11373#[cfg_attr(feature = "ts", derive(TS))]
11374#[cfg_attr(feature = "ts", ts(export))]
11375pub struct ENCAPSULATED_DATA_DATA {
11376    #[doc = "sequence number (starting with 0 on every transmission)"]
11377    pub seqnr: u16,
11378    #[doc = "image data bytes"]
11379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11380    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11381    pub data: [u8; 253],
11382}
11383impl ENCAPSULATED_DATA_DATA {
11384    pub const ENCODED_LEN: usize = 255usize;
11385    pub const DEFAULT: Self = Self {
11386        seqnr: 0_u16,
11387        data: [0_u8; 253usize],
11388    };
11389    #[cfg(feature = "arbitrary")]
11390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11391        use arbitrary::{Arbitrary, Unstructured};
11392        let mut buf = [0u8; 1024];
11393        rng.fill_bytes(&mut buf);
11394        let mut unstructured = Unstructured::new(&buf);
11395        Self::arbitrary(&mut unstructured).unwrap_or_default()
11396    }
11397}
11398impl Default for ENCAPSULATED_DATA_DATA {
11399    fn default() -> Self {
11400        Self::DEFAULT.clone()
11401    }
11402}
11403impl MessageData for ENCAPSULATED_DATA_DATA {
11404    type Message = MavMessage;
11405    const ID: u32 = 131u32;
11406    const NAME: &'static str = "ENCAPSULATED_DATA";
11407    const EXTRA_CRC: u8 = 223u8;
11408    const ENCODED_LEN: usize = 255usize;
11409    fn deser(
11410        _version: MavlinkVersion,
11411        __input: &[u8],
11412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11413        let avail_len = __input.len();
11414        let mut payload_buf = [0; Self::ENCODED_LEN];
11415        let mut buf = if avail_len < Self::ENCODED_LEN {
11416            payload_buf[0..avail_len].copy_from_slice(__input);
11417            Bytes::new(&payload_buf)
11418        } else {
11419            Bytes::new(__input)
11420        };
11421        let mut __struct = Self::default();
11422        __struct.seqnr = buf.get_u16_le();
11423        for v in &mut __struct.data {
11424            let val = buf.get_u8();
11425            *v = val;
11426        }
11427        Ok(__struct)
11428    }
11429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11430        let mut __tmp = BytesMut::new(bytes);
11431        #[allow(clippy::absurd_extreme_comparisons)]
11432        #[allow(unused_comparisons)]
11433        if __tmp.remaining() < Self::ENCODED_LEN {
11434            panic!(
11435                "buffer is too small (need {} bytes, but got {})",
11436                Self::ENCODED_LEN,
11437                __tmp.remaining(),
11438            )
11439        }
11440        __tmp.put_u16_le(self.seqnr);
11441        for val in &self.data {
11442            __tmp.put_u8(*val);
11443        }
11444        if matches!(version, MavlinkVersion::V2) {
11445            let len = __tmp.len();
11446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11447        } else {
11448            __tmp.len()
11449        }
11450    }
11451}
11452#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11453#[doc = ""]
11454#[doc = "ID: 290"]
11455#[derive(Debug, Clone, PartialEq)]
11456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11458#[cfg_attr(feature = "ts", derive(TS))]
11459#[cfg_attr(feature = "ts", ts(export))]
11460pub struct ESC_INFO_DATA {
11461    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11462    pub time_usec: u64,
11463    #[doc = "Number of reported errors by each ESC since boot."]
11464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11466    pub error_count: [u32; 4],
11467    #[doc = "Counter of data packets received."]
11468    pub counter: u16,
11469    #[doc = "Bitmap of ESC failure flags."]
11470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11472    pub failure_flags: [u16; 4],
11473    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11475    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11476    pub temperature: [i16; 4],
11477    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11478    pub index: u8,
11479    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11480    pub count: u8,
11481    #[doc = "Connection type protocol for all ESC."]
11482    pub connection_type: EscConnectionType,
11483    #[doc = "Information regarding online/offline status of each ESC."]
11484    pub info: u8,
11485}
11486impl ESC_INFO_DATA {
11487    pub const ENCODED_LEN: usize = 46usize;
11488    pub const DEFAULT: Self = Self {
11489        time_usec: 0_u64,
11490        error_count: [0_u32; 4usize],
11491        counter: 0_u16,
11492        failure_flags: [0_u16; 4usize],
11493        temperature: [0_i16; 4usize],
11494        index: 0_u8,
11495        count: 0_u8,
11496        connection_type: EscConnectionType::DEFAULT,
11497        info: 0_u8,
11498    };
11499    #[cfg(feature = "arbitrary")]
11500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11501        use arbitrary::{Arbitrary, Unstructured};
11502        let mut buf = [0u8; 1024];
11503        rng.fill_bytes(&mut buf);
11504        let mut unstructured = Unstructured::new(&buf);
11505        Self::arbitrary(&mut unstructured).unwrap_or_default()
11506    }
11507}
11508impl Default for ESC_INFO_DATA {
11509    fn default() -> Self {
11510        Self::DEFAULT.clone()
11511    }
11512}
11513impl MessageData for ESC_INFO_DATA {
11514    type Message = MavMessage;
11515    const ID: u32 = 290u32;
11516    const NAME: &'static str = "ESC_INFO";
11517    const EXTRA_CRC: u8 = 251u8;
11518    const ENCODED_LEN: usize = 46usize;
11519    fn deser(
11520        _version: MavlinkVersion,
11521        __input: &[u8],
11522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11523        let avail_len = __input.len();
11524        let mut payload_buf = [0; Self::ENCODED_LEN];
11525        let mut buf = if avail_len < Self::ENCODED_LEN {
11526            payload_buf[0..avail_len].copy_from_slice(__input);
11527            Bytes::new(&payload_buf)
11528        } else {
11529            Bytes::new(__input)
11530        };
11531        let mut __struct = Self::default();
11532        __struct.time_usec = buf.get_u64_le();
11533        for v in &mut __struct.error_count {
11534            let val = buf.get_u32_le();
11535            *v = val;
11536        }
11537        __struct.counter = buf.get_u16_le();
11538        for v in &mut __struct.failure_flags {
11539            let val = buf.get_u16_le();
11540            *v = val;
11541        }
11542        for v in &mut __struct.temperature {
11543            let val = buf.get_i16_le();
11544            *v = val;
11545        }
11546        __struct.index = buf.get_u8();
11547        __struct.count = buf.get_u8();
11548        let tmp = buf.get_u8();
11549        __struct.connection_type =
11550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11551                enum_type: "EscConnectionType",
11552                value: tmp as u64,
11553            })?;
11554        __struct.info = buf.get_u8();
11555        Ok(__struct)
11556    }
11557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11558        let mut __tmp = BytesMut::new(bytes);
11559        #[allow(clippy::absurd_extreme_comparisons)]
11560        #[allow(unused_comparisons)]
11561        if __tmp.remaining() < Self::ENCODED_LEN {
11562            panic!(
11563                "buffer is too small (need {} bytes, but got {})",
11564                Self::ENCODED_LEN,
11565                __tmp.remaining(),
11566            )
11567        }
11568        __tmp.put_u64_le(self.time_usec);
11569        for val in &self.error_count {
11570            __tmp.put_u32_le(*val);
11571        }
11572        __tmp.put_u16_le(self.counter);
11573        for val in &self.failure_flags {
11574            __tmp.put_u16_le(*val);
11575        }
11576        for val in &self.temperature {
11577            __tmp.put_i16_le(*val);
11578        }
11579        __tmp.put_u8(self.index);
11580        __tmp.put_u8(self.count);
11581        __tmp.put_u8(self.connection_type as u8);
11582        __tmp.put_u8(self.info);
11583        if matches!(version, MavlinkVersion::V2) {
11584            let len = __tmp.len();
11585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11586        } else {
11587            __tmp.len()
11588        }
11589    }
11590}
11591#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11592#[doc = ""]
11593#[doc = "ID: 291"]
11594#[derive(Debug, Clone, PartialEq)]
11595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11597#[cfg_attr(feature = "ts", derive(TS))]
11598#[cfg_attr(feature = "ts", ts(export))]
11599pub struct ESC_STATUS_DATA {
11600    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11601    pub time_usec: u64,
11602    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11605    pub rpm: [i32; 4],
11606    #[doc = "Voltage measured from each ESC."]
11607    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11608    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11609    pub voltage: [f32; 4],
11610    #[doc = "Current measured from each ESC."]
11611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11613    pub current: [f32; 4],
11614    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11615    pub index: u8,
11616}
11617impl ESC_STATUS_DATA {
11618    pub const ENCODED_LEN: usize = 57usize;
11619    pub const DEFAULT: Self = Self {
11620        time_usec: 0_u64,
11621        rpm: [0_i32; 4usize],
11622        voltage: [0.0_f32; 4usize],
11623        current: [0.0_f32; 4usize],
11624        index: 0_u8,
11625    };
11626    #[cfg(feature = "arbitrary")]
11627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11628        use arbitrary::{Arbitrary, Unstructured};
11629        let mut buf = [0u8; 1024];
11630        rng.fill_bytes(&mut buf);
11631        let mut unstructured = Unstructured::new(&buf);
11632        Self::arbitrary(&mut unstructured).unwrap_or_default()
11633    }
11634}
11635impl Default for ESC_STATUS_DATA {
11636    fn default() -> Self {
11637        Self::DEFAULT.clone()
11638    }
11639}
11640impl MessageData for ESC_STATUS_DATA {
11641    type Message = MavMessage;
11642    const ID: u32 = 291u32;
11643    const NAME: &'static str = "ESC_STATUS";
11644    const EXTRA_CRC: u8 = 10u8;
11645    const ENCODED_LEN: usize = 57usize;
11646    fn deser(
11647        _version: MavlinkVersion,
11648        __input: &[u8],
11649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11650        let avail_len = __input.len();
11651        let mut payload_buf = [0; Self::ENCODED_LEN];
11652        let mut buf = if avail_len < Self::ENCODED_LEN {
11653            payload_buf[0..avail_len].copy_from_slice(__input);
11654            Bytes::new(&payload_buf)
11655        } else {
11656            Bytes::new(__input)
11657        };
11658        let mut __struct = Self::default();
11659        __struct.time_usec = buf.get_u64_le();
11660        for v in &mut __struct.rpm {
11661            let val = buf.get_i32_le();
11662            *v = val;
11663        }
11664        for v in &mut __struct.voltage {
11665            let val = buf.get_f32_le();
11666            *v = val;
11667        }
11668        for v in &mut __struct.current {
11669            let val = buf.get_f32_le();
11670            *v = val;
11671        }
11672        __struct.index = buf.get_u8();
11673        Ok(__struct)
11674    }
11675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11676        let mut __tmp = BytesMut::new(bytes);
11677        #[allow(clippy::absurd_extreme_comparisons)]
11678        #[allow(unused_comparisons)]
11679        if __tmp.remaining() < Self::ENCODED_LEN {
11680            panic!(
11681                "buffer is too small (need {} bytes, but got {})",
11682                Self::ENCODED_LEN,
11683                __tmp.remaining(),
11684            )
11685        }
11686        __tmp.put_u64_le(self.time_usec);
11687        for val in &self.rpm {
11688            __tmp.put_i32_le(*val);
11689        }
11690        for val in &self.voltage {
11691            __tmp.put_f32_le(*val);
11692        }
11693        for val in &self.current {
11694            __tmp.put_f32_le(*val);
11695        }
11696        __tmp.put_u8(self.index);
11697        if matches!(version, MavlinkVersion::V2) {
11698            let len = __tmp.len();
11699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11700        } else {
11701            __tmp.len()
11702        }
11703    }
11704}
11705#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11706#[doc = ""]
11707#[doc = "ID: 230"]
11708#[derive(Debug, Clone, PartialEq)]
11709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11711#[cfg_attr(feature = "ts", derive(TS))]
11712#[cfg_attr(feature = "ts", ts(export))]
11713pub struct ESTIMATOR_STATUS_DATA {
11714    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11715    pub time_usec: u64,
11716    #[doc = "Velocity innovation test ratio"]
11717    pub vel_ratio: f32,
11718    #[doc = "Horizontal position innovation test ratio"]
11719    pub pos_horiz_ratio: f32,
11720    #[doc = "Vertical position innovation test ratio"]
11721    pub pos_vert_ratio: f32,
11722    #[doc = "Magnetometer innovation test ratio"]
11723    pub mag_ratio: f32,
11724    #[doc = "Height above terrain innovation test ratio"]
11725    pub hagl_ratio: f32,
11726    #[doc = "True airspeed innovation test ratio"]
11727    pub tas_ratio: f32,
11728    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11729    pub pos_horiz_accuracy: f32,
11730    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11731    pub pos_vert_accuracy: f32,
11732    #[doc = "Bitmap indicating which EKF outputs are valid."]
11733    pub flags: EstimatorStatusFlags,
11734}
11735impl ESTIMATOR_STATUS_DATA {
11736    pub const ENCODED_LEN: usize = 42usize;
11737    pub const DEFAULT: Self = Self {
11738        time_usec: 0_u64,
11739        vel_ratio: 0.0_f32,
11740        pos_horiz_ratio: 0.0_f32,
11741        pos_vert_ratio: 0.0_f32,
11742        mag_ratio: 0.0_f32,
11743        hagl_ratio: 0.0_f32,
11744        tas_ratio: 0.0_f32,
11745        pos_horiz_accuracy: 0.0_f32,
11746        pos_vert_accuracy: 0.0_f32,
11747        flags: EstimatorStatusFlags::DEFAULT,
11748    };
11749    #[cfg(feature = "arbitrary")]
11750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11751        use arbitrary::{Arbitrary, Unstructured};
11752        let mut buf = [0u8; 1024];
11753        rng.fill_bytes(&mut buf);
11754        let mut unstructured = Unstructured::new(&buf);
11755        Self::arbitrary(&mut unstructured).unwrap_or_default()
11756    }
11757}
11758impl Default for ESTIMATOR_STATUS_DATA {
11759    fn default() -> Self {
11760        Self::DEFAULT.clone()
11761    }
11762}
11763impl MessageData for ESTIMATOR_STATUS_DATA {
11764    type Message = MavMessage;
11765    const ID: u32 = 230u32;
11766    const NAME: &'static str = "ESTIMATOR_STATUS";
11767    const EXTRA_CRC: u8 = 163u8;
11768    const ENCODED_LEN: usize = 42usize;
11769    fn deser(
11770        _version: MavlinkVersion,
11771        __input: &[u8],
11772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11773        let avail_len = __input.len();
11774        let mut payload_buf = [0; Self::ENCODED_LEN];
11775        let mut buf = if avail_len < Self::ENCODED_LEN {
11776            payload_buf[0..avail_len].copy_from_slice(__input);
11777            Bytes::new(&payload_buf)
11778        } else {
11779            Bytes::new(__input)
11780        };
11781        let mut __struct = Self::default();
11782        __struct.time_usec = buf.get_u64_le();
11783        __struct.vel_ratio = buf.get_f32_le();
11784        __struct.pos_horiz_ratio = buf.get_f32_le();
11785        __struct.pos_vert_ratio = buf.get_f32_le();
11786        __struct.mag_ratio = buf.get_f32_le();
11787        __struct.hagl_ratio = buf.get_f32_le();
11788        __struct.tas_ratio = buf.get_f32_le();
11789        __struct.pos_horiz_accuracy = buf.get_f32_le();
11790        __struct.pos_vert_accuracy = buf.get_f32_le();
11791        let tmp = buf.get_u16_le();
11792        __struct.flags = EstimatorStatusFlags::from_bits(tmp).ok_or(
11793            ::mavlink_core::error::ParserError::InvalidFlag {
11794                flag_type: "EstimatorStatusFlags",
11795                value: tmp as u64,
11796            },
11797        )?;
11798        Ok(__struct)
11799    }
11800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11801        let mut __tmp = BytesMut::new(bytes);
11802        #[allow(clippy::absurd_extreme_comparisons)]
11803        #[allow(unused_comparisons)]
11804        if __tmp.remaining() < Self::ENCODED_LEN {
11805            panic!(
11806                "buffer is too small (need {} bytes, but got {})",
11807                Self::ENCODED_LEN,
11808                __tmp.remaining(),
11809            )
11810        }
11811        __tmp.put_u64_le(self.time_usec);
11812        __tmp.put_f32_le(self.vel_ratio);
11813        __tmp.put_f32_le(self.pos_horiz_ratio);
11814        __tmp.put_f32_le(self.pos_vert_ratio);
11815        __tmp.put_f32_le(self.mag_ratio);
11816        __tmp.put_f32_le(self.hagl_ratio);
11817        __tmp.put_f32_le(self.tas_ratio);
11818        __tmp.put_f32_le(self.pos_horiz_accuracy);
11819        __tmp.put_f32_le(self.pos_vert_accuracy);
11820        __tmp.put_u16_le(self.flags.bits());
11821        if matches!(version, MavlinkVersion::V2) {
11822            let len = __tmp.len();
11823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11824        } else {
11825            __tmp.len()
11826        }
11827    }
11828}
11829#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11830#[doc = ""]
11831#[doc = "ID: 410"]
11832#[derive(Debug, Clone, PartialEq)]
11833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11835#[cfg_attr(feature = "ts", derive(TS))]
11836#[cfg_attr(feature = "ts", ts(export))]
11837pub struct EVENT_DATA {
11838    #[doc = "Event ID (as defined in the component metadata)"]
11839    pub id: u32,
11840    #[doc = "Timestamp (time since system boot when the event happened)."]
11841    pub event_time_boot_ms: u32,
11842    #[doc = "Sequence number."]
11843    pub sequence: u16,
11844    #[doc = "Component ID"]
11845    pub destination_component: u8,
11846    #[doc = "System ID"]
11847    pub destination_system: u8,
11848    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11849    pub log_levels: u8,
11850    #[doc = "Arguments (depend on event ID)."]
11851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11852    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11853    pub arguments: [u8; 40],
11854}
11855impl EVENT_DATA {
11856    pub const ENCODED_LEN: usize = 53usize;
11857    pub const DEFAULT: Self = Self {
11858        id: 0_u32,
11859        event_time_boot_ms: 0_u32,
11860        sequence: 0_u16,
11861        destination_component: 0_u8,
11862        destination_system: 0_u8,
11863        log_levels: 0_u8,
11864        arguments: [0_u8; 40usize],
11865    };
11866    #[cfg(feature = "arbitrary")]
11867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11868        use arbitrary::{Arbitrary, Unstructured};
11869        let mut buf = [0u8; 1024];
11870        rng.fill_bytes(&mut buf);
11871        let mut unstructured = Unstructured::new(&buf);
11872        Self::arbitrary(&mut unstructured).unwrap_or_default()
11873    }
11874}
11875impl Default for EVENT_DATA {
11876    fn default() -> Self {
11877        Self::DEFAULT.clone()
11878    }
11879}
11880impl MessageData for EVENT_DATA {
11881    type Message = MavMessage;
11882    const ID: u32 = 410u32;
11883    const NAME: &'static str = "EVENT";
11884    const EXTRA_CRC: u8 = 160u8;
11885    const ENCODED_LEN: usize = 53usize;
11886    fn deser(
11887        _version: MavlinkVersion,
11888        __input: &[u8],
11889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11890        let avail_len = __input.len();
11891        let mut payload_buf = [0; Self::ENCODED_LEN];
11892        let mut buf = if avail_len < Self::ENCODED_LEN {
11893            payload_buf[0..avail_len].copy_from_slice(__input);
11894            Bytes::new(&payload_buf)
11895        } else {
11896            Bytes::new(__input)
11897        };
11898        let mut __struct = Self::default();
11899        __struct.id = buf.get_u32_le();
11900        __struct.event_time_boot_ms = buf.get_u32_le();
11901        __struct.sequence = buf.get_u16_le();
11902        __struct.destination_component = buf.get_u8();
11903        __struct.destination_system = buf.get_u8();
11904        __struct.log_levels = buf.get_u8();
11905        for v in &mut __struct.arguments {
11906            let val = buf.get_u8();
11907            *v = val;
11908        }
11909        Ok(__struct)
11910    }
11911    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11912        let mut __tmp = BytesMut::new(bytes);
11913        #[allow(clippy::absurd_extreme_comparisons)]
11914        #[allow(unused_comparisons)]
11915        if __tmp.remaining() < Self::ENCODED_LEN {
11916            panic!(
11917                "buffer is too small (need {} bytes, but got {})",
11918                Self::ENCODED_LEN,
11919                __tmp.remaining(),
11920            )
11921        }
11922        __tmp.put_u32_le(self.id);
11923        __tmp.put_u32_le(self.event_time_boot_ms);
11924        __tmp.put_u16_le(self.sequence);
11925        __tmp.put_u8(self.destination_component);
11926        __tmp.put_u8(self.destination_system);
11927        __tmp.put_u8(self.log_levels);
11928        for val in &self.arguments {
11929            __tmp.put_u8(*val);
11930        }
11931        if matches!(version, MavlinkVersion::V2) {
11932            let len = __tmp.len();
11933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11934        } else {
11935            __tmp.len()
11936        }
11937    }
11938}
11939#[doc = "Provides state for additional features."]
11940#[doc = ""]
11941#[doc = "ID: 245"]
11942#[derive(Debug, Clone, PartialEq)]
11943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11945#[cfg_attr(feature = "ts", derive(TS))]
11946#[cfg_attr(feature = "ts", ts(export))]
11947pub struct EXTENDED_SYS_STATE_DATA {
11948    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11949    pub vtol_state: MavVtolState,
11950    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11951    pub landed_state: MavLandedState,
11952}
11953impl EXTENDED_SYS_STATE_DATA {
11954    pub const ENCODED_LEN: usize = 2usize;
11955    pub const DEFAULT: Self = Self {
11956        vtol_state: MavVtolState::DEFAULT,
11957        landed_state: MavLandedState::DEFAULT,
11958    };
11959    #[cfg(feature = "arbitrary")]
11960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11961        use arbitrary::{Arbitrary, Unstructured};
11962        let mut buf = [0u8; 1024];
11963        rng.fill_bytes(&mut buf);
11964        let mut unstructured = Unstructured::new(&buf);
11965        Self::arbitrary(&mut unstructured).unwrap_or_default()
11966    }
11967}
11968impl Default for EXTENDED_SYS_STATE_DATA {
11969    fn default() -> Self {
11970        Self::DEFAULT.clone()
11971    }
11972}
11973impl MessageData for EXTENDED_SYS_STATE_DATA {
11974    type Message = MavMessage;
11975    const ID: u32 = 245u32;
11976    const NAME: &'static str = "EXTENDED_SYS_STATE";
11977    const EXTRA_CRC: u8 = 130u8;
11978    const ENCODED_LEN: usize = 2usize;
11979    fn deser(
11980        _version: MavlinkVersion,
11981        __input: &[u8],
11982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11983        let avail_len = __input.len();
11984        let mut payload_buf = [0; Self::ENCODED_LEN];
11985        let mut buf = if avail_len < Self::ENCODED_LEN {
11986            payload_buf[0..avail_len].copy_from_slice(__input);
11987            Bytes::new(&payload_buf)
11988        } else {
11989            Bytes::new(__input)
11990        };
11991        let mut __struct = Self::default();
11992        let tmp = buf.get_u8();
11993        __struct.vtol_state =
11994            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11995                enum_type: "MavVtolState",
11996                value: tmp as u64,
11997            })?;
11998        let tmp = buf.get_u8();
11999        __struct.landed_state =
12000            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12001                enum_type: "MavLandedState",
12002                value: tmp as u64,
12003            })?;
12004        Ok(__struct)
12005    }
12006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12007        let mut __tmp = BytesMut::new(bytes);
12008        #[allow(clippy::absurd_extreme_comparisons)]
12009        #[allow(unused_comparisons)]
12010        if __tmp.remaining() < Self::ENCODED_LEN {
12011            panic!(
12012                "buffer is too small (need {} bytes, but got {})",
12013                Self::ENCODED_LEN,
12014                __tmp.remaining(),
12015            )
12016        }
12017        __tmp.put_u8(self.vtol_state as u8);
12018        __tmp.put_u8(self.landed_state as u8);
12019        if matches!(version, MavlinkVersion::V2) {
12020            let len = __tmp.len();
12021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12022        } else {
12023            __tmp.len()
12024        }
12025    }
12026}
12027#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12028#[doc = ""]
12029#[doc = "ID: 162"]
12030#[derive(Debug, Clone, PartialEq)]
12031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12033#[cfg_attr(feature = "ts", derive(TS))]
12034#[cfg_attr(feature = "ts", ts(export))]
12035pub struct FENCE_STATUS_DATA {
12036    #[doc = "Time (since boot) of last breach."]
12037    pub breach_time: u32,
12038    #[doc = "Number of fence breaches."]
12039    pub breach_count: u16,
12040    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12041    pub breach_status: u8,
12042    #[doc = "Last breach type."]
12043    pub breach_type: FenceBreach,
12044    #[doc = "Active action to prevent fence breach"]
12045    #[cfg_attr(feature = "serde", serde(default))]
12046    pub breach_mitigation: FenceMitigate,
12047}
12048impl FENCE_STATUS_DATA {
12049    pub const ENCODED_LEN: usize = 9usize;
12050    pub const DEFAULT: Self = Self {
12051        breach_time: 0_u32,
12052        breach_count: 0_u16,
12053        breach_status: 0_u8,
12054        breach_type: FenceBreach::DEFAULT,
12055        breach_mitigation: FenceMitigate::DEFAULT,
12056    };
12057    #[cfg(feature = "arbitrary")]
12058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12059        use arbitrary::{Arbitrary, Unstructured};
12060        let mut buf = [0u8; 1024];
12061        rng.fill_bytes(&mut buf);
12062        let mut unstructured = Unstructured::new(&buf);
12063        Self::arbitrary(&mut unstructured).unwrap_or_default()
12064    }
12065}
12066impl Default for FENCE_STATUS_DATA {
12067    fn default() -> Self {
12068        Self::DEFAULT.clone()
12069    }
12070}
12071impl MessageData for FENCE_STATUS_DATA {
12072    type Message = MavMessage;
12073    const ID: u32 = 162u32;
12074    const NAME: &'static str = "FENCE_STATUS";
12075    const EXTRA_CRC: u8 = 189u8;
12076    const ENCODED_LEN: usize = 9usize;
12077    fn deser(
12078        _version: MavlinkVersion,
12079        __input: &[u8],
12080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12081        let avail_len = __input.len();
12082        let mut payload_buf = [0; Self::ENCODED_LEN];
12083        let mut buf = if avail_len < Self::ENCODED_LEN {
12084            payload_buf[0..avail_len].copy_from_slice(__input);
12085            Bytes::new(&payload_buf)
12086        } else {
12087            Bytes::new(__input)
12088        };
12089        let mut __struct = Self::default();
12090        __struct.breach_time = buf.get_u32_le();
12091        __struct.breach_count = buf.get_u16_le();
12092        __struct.breach_status = buf.get_u8();
12093        let tmp = buf.get_u8();
12094        __struct.breach_type =
12095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12096                enum_type: "FenceBreach",
12097                value: tmp as u64,
12098            })?;
12099        let tmp = buf.get_u8();
12100        __struct.breach_mitigation =
12101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12102                enum_type: "FenceMitigate",
12103                value: tmp as u64,
12104            })?;
12105        Ok(__struct)
12106    }
12107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12108        let mut __tmp = BytesMut::new(bytes);
12109        #[allow(clippy::absurd_extreme_comparisons)]
12110        #[allow(unused_comparisons)]
12111        if __tmp.remaining() < Self::ENCODED_LEN {
12112            panic!(
12113                "buffer is too small (need {} bytes, but got {})",
12114                Self::ENCODED_LEN,
12115                __tmp.remaining(),
12116            )
12117        }
12118        __tmp.put_u32_le(self.breach_time);
12119        __tmp.put_u16_le(self.breach_count);
12120        __tmp.put_u8(self.breach_status);
12121        __tmp.put_u8(self.breach_type as u8);
12122        if matches!(version, MavlinkVersion::V2) {
12123            __tmp.put_u8(self.breach_mitigation as u8);
12124            let len = __tmp.len();
12125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12126        } else {
12127            __tmp.len()
12128        }
12129    }
12130}
12131#[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
12132#[doc = ""]
12133#[doc = "ID: 361"]
12134#[derive(Debug, Clone, PartialEq)]
12135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12137#[cfg_attr(feature = "ts", derive(TS))]
12138#[cfg_attr(feature = "ts", ts(export))]
12139pub struct FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12140    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12141    pub time_usec: u64,
12142    #[doc = "Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise."]
12143    pub major_radius: f32,
12144    #[doc = "Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure."]
12145    pub minor_radius: f32,
12146    #[doc = "Orientation of the figure eight major axis with respect to true north in [-pi,pi)."]
12147    pub orientation: f32,
12148    #[doc = "X coordinate of center point. Coordinate system depends on frame field."]
12149    pub x: i32,
12150    #[doc = "Y coordinate of center point. Coordinate system depends on frame field."]
12151    pub y: i32,
12152    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
12153    pub z: f32,
12154    #[doc = "The coordinate system of the fields: x, y, z."]
12155    pub frame: MavFrame,
12156}
12157impl FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12158    pub const ENCODED_LEN: usize = 33usize;
12159    pub const DEFAULT: Self = Self {
12160        time_usec: 0_u64,
12161        major_radius: 0.0_f32,
12162        minor_radius: 0.0_f32,
12163        orientation: 0.0_f32,
12164        x: 0_i32,
12165        y: 0_i32,
12166        z: 0.0_f32,
12167        frame: MavFrame::DEFAULT,
12168    };
12169    #[cfg(feature = "arbitrary")]
12170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12171        use arbitrary::{Arbitrary, Unstructured};
12172        let mut buf = [0u8; 1024];
12173        rng.fill_bytes(&mut buf);
12174        let mut unstructured = Unstructured::new(&buf);
12175        Self::arbitrary(&mut unstructured).unwrap_or_default()
12176    }
12177}
12178impl Default for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12179    fn default() -> Self {
12180        Self::DEFAULT.clone()
12181    }
12182}
12183impl MessageData for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12184    type Message = MavMessage;
12185    const ID: u32 = 361u32;
12186    const NAME: &'static str = "FIGURE_EIGHT_EXECUTION_STATUS";
12187    const EXTRA_CRC: u8 = 93u8;
12188    const ENCODED_LEN: usize = 33usize;
12189    fn deser(
12190        _version: MavlinkVersion,
12191        __input: &[u8],
12192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12193        let avail_len = __input.len();
12194        let mut payload_buf = [0; Self::ENCODED_LEN];
12195        let mut buf = if avail_len < Self::ENCODED_LEN {
12196            payload_buf[0..avail_len].copy_from_slice(__input);
12197            Bytes::new(&payload_buf)
12198        } else {
12199            Bytes::new(__input)
12200        };
12201        let mut __struct = Self::default();
12202        __struct.time_usec = buf.get_u64_le();
12203        __struct.major_radius = buf.get_f32_le();
12204        __struct.minor_radius = buf.get_f32_le();
12205        __struct.orientation = buf.get_f32_le();
12206        __struct.x = buf.get_i32_le();
12207        __struct.y = buf.get_i32_le();
12208        __struct.z = buf.get_f32_le();
12209        let tmp = buf.get_u8();
12210        __struct.frame =
12211            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12212                enum_type: "MavFrame",
12213                value: tmp as u64,
12214            })?;
12215        Ok(__struct)
12216    }
12217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12218        let mut __tmp = BytesMut::new(bytes);
12219        #[allow(clippy::absurd_extreme_comparisons)]
12220        #[allow(unused_comparisons)]
12221        if __tmp.remaining() < Self::ENCODED_LEN {
12222            panic!(
12223                "buffer is too small (need {} bytes, but got {})",
12224                Self::ENCODED_LEN,
12225                __tmp.remaining(),
12226            )
12227        }
12228        __tmp.put_u64_le(self.time_usec);
12229        __tmp.put_f32_le(self.major_radius);
12230        __tmp.put_f32_le(self.minor_radius);
12231        __tmp.put_f32_le(self.orientation);
12232        __tmp.put_i32_le(self.x);
12233        __tmp.put_i32_le(self.y);
12234        __tmp.put_f32_le(self.z);
12235        __tmp.put_u8(self.frame as u8);
12236        if matches!(version, MavlinkVersion::V2) {
12237            let len = __tmp.len();
12238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12239        } else {
12240            __tmp.len()
12241        }
12242    }
12243}
12244#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12245#[doc = ""]
12246#[doc = "ID: 110"]
12247#[derive(Debug, Clone, PartialEq)]
12248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12250#[cfg_attr(feature = "ts", derive(TS))]
12251#[cfg_attr(feature = "ts", ts(export))]
12252pub struct FILE_TRANSFER_PROTOCOL_DATA {
12253    #[doc = "Network ID (0 for broadcast)"]
12254    pub target_network: u8,
12255    #[doc = "System ID (0 for broadcast)"]
12256    pub target_system: u8,
12257    #[doc = "Component ID (0 for broadcast)"]
12258    pub target_component: u8,
12259    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12261    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12262    pub payload: [u8; 251],
12263}
12264impl FILE_TRANSFER_PROTOCOL_DATA {
12265    pub const ENCODED_LEN: usize = 254usize;
12266    pub const DEFAULT: Self = Self {
12267        target_network: 0_u8,
12268        target_system: 0_u8,
12269        target_component: 0_u8,
12270        payload: [0_u8; 251usize],
12271    };
12272    #[cfg(feature = "arbitrary")]
12273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12274        use arbitrary::{Arbitrary, Unstructured};
12275        let mut buf = [0u8; 1024];
12276        rng.fill_bytes(&mut buf);
12277        let mut unstructured = Unstructured::new(&buf);
12278        Self::arbitrary(&mut unstructured).unwrap_or_default()
12279    }
12280}
12281impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12282    fn default() -> Self {
12283        Self::DEFAULT.clone()
12284    }
12285}
12286impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12287    type Message = MavMessage;
12288    const ID: u32 = 110u32;
12289    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12290    const EXTRA_CRC: u8 = 84u8;
12291    const ENCODED_LEN: usize = 254usize;
12292    fn deser(
12293        _version: MavlinkVersion,
12294        __input: &[u8],
12295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12296        let avail_len = __input.len();
12297        let mut payload_buf = [0; Self::ENCODED_LEN];
12298        let mut buf = if avail_len < Self::ENCODED_LEN {
12299            payload_buf[0..avail_len].copy_from_slice(__input);
12300            Bytes::new(&payload_buf)
12301        } else {
12302            Bytes::new(__input)
12303        };
12304        let mut __struct = Self::default();
12305        __struct.target_network = buf.get_u8();
12306        __struct.target_system = buf.get_u8();
12307        __struct.target_component = buf.get_u8();
12308        for v in &mut __struct.payload {
12309            let val = buf.get_u8();
12310            *v = val;
12311        }
12312        Ok(__struct)
12313    }
12314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12315        let mut __tmp = BytesMut::new(bytes);
12316        #[allow(clippy::absurd_extreme_comparisons)]
12317        #[allow(unused_comparisons)]
12318        if __tmp.remaining() < Self::ENCODED_LEN {
12319            panic!(
12320                "buffer is too small (need {} bytes, but got {})",
12321                Self::ENCODED_LEN,
12322                __tmp.remaining(),
12323            )
12324        }
12325        __tmp.put_u8(self.target_network);
12326        __tmp.put_u8(self.target_system);
12327        __tmp.put_u8(self.target_component);
12328        for val in &self.payload {
12329            __tmp.put_u8(*val);
12330        }
12331        if matches!(version, MavlinkVersion::V2) {
12332            let len = __tmp.len();
12333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12334        } else {
12335            __tmp.len()
12336        }
12337    }
12338}
12339#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12340#[doc = ""]
12341#[doc = "ID: 264"]
12342#[derive(Debug, Clone, PartialEq)]
12343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12345#[cfg_attr(feature = "ts", derive(TS))]
12346#[cfg_attr(feature = "ts", ts(export))]
12347pub struct FLIGHT_INFORMATION_DATA {
12348    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12349    pub arming_time_utc: u64,
12350    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12351    pub takeoff_time_utc: u64,
12352    #[doc = "Flight number. Note, field is misnamed UUID."]
12353    pub flight_uuid: u64,
12354    #[doc = "Timestamp (time since system boot)."]
12355    pub time_boot_ms: u32,
12356    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12357    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12358    pub landing_time: u32,
12359}
12360impl FLIGHT_INFORMATION_DATA {
12361    pub const ENCODED_LEN: usize = 32usize;
12362    pub const DEFAULT: Self = Self {
12363        arming_time_utc: 0_u64,
12364        takeoff_time_utc: 0_u64,
12365        flight_uuid: 0_u64,
12366        time_boot_ms: 0_u32,
12367        landing_time: 0_u32,
12368    };
12369    #[cfg(feature = "arbitrary")]
12370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12371        use arbitrary::{Arbitrary, Unstructured};
12372        let mut buf = [0u8; 1024];
12373        rng.fill_bytes(&mut buf);
12374        let mut unstructured = Unstructured::new(&buf);
12375        Self::arbitrary(&mut unstructured).unwrap_or_default()
12376    }
12377}
12378impl Default for FLIGHT_INFORMATION_DATA {
12379    fn default() -> Self {
12380        Self::DEFAULT.clone()
12381    }
12382}
12383impl MessageData for FLIGHT_INFORMATION_DATA {
12384    type Message = MavMessage;
12385    const ID: u32 = 264u32;
12386    const NAME: &'static str = "FLIGHT_INFORMATION";
12387    const EXTRA_CRC: u8 = 49u8;
12388    const ENCODED_LEN: usize = 32usize;
12389    fn deser(
12390        _version: MavlinkVersion,
12391        __input: &[u8],
12392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12393        let avail_len = __input.len();
12394        let mut payload_buf = [0; Self::ENCODED_LEN];
12395        let mut buf = if avail_len < Self::ENCODED_LEN {
12396            payload_buf[0..avail_len].copy_from_slice(__input);
12397            Bytes::new(&payload_buf)
12398        } else {
12399            Bytes::new(__input)
12400        };
12401        let mut __struct = Self::default();
12402        __struct.arming_time_utc = buf.get_u64_le();
12403        __struct.takeoff_time_utc = buf.get_u64_le();
12404        __struct.flight_uuid = buf.get_u64_le();
12405        __struct.time_boot_ms = buf.get_u32_le();
12406        __struct.landing_time = buf.get_u32_le();
12407        Ok(__struct)
12408    }
12409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12410        let mut __tmp = BytesMut::new(bytes);
12411        #[allow(clippy::absurd_extreme_comparisons)]
12412        #[allow(unused_comparisons)]
12413        if __tmp.remaining() < Self::ENCODED_LEN {
12414            panic!(
12415                "buffer is too small (need {} bytes, but got {})",
12416                Self::ENCODED_LEN,
12417                __tmp.remaining(),
12418            )
12419        }
12420        __tmp.put_u64_le(self.arming_time_utc);
12421        __tmp.put_u64_le(self.takeoff_time_utc);
12422        __tmp.put_u64_le(self.flight_uuid);
12423        __tmp.put_u32_le(self.time_boot_ms);
12424        if matches!(version, MavlinkVersion::V2) {
12425            __tmp.put_u32_le(self.landing_time);
12426            let len = __tmp.len();
12427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12428        } else {
12429            __tmp.len()
12430        }
12431    }
12432}
12433#[doc = "Current motion information from a designated system."]
12434#[doc = ""]
12435#[doc = "ID: 144"]
12436#[derive(Debug, Clone, PartialEq)]
12437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12439#[cfg_attr(feature = "ts", derive(TS))]
12440#[cfg_attr(feature = "ts", ts(export))]
12441pub struct FOLLOW_TARGET_DATA {
12442    #[doc = "Timestamp (time since system boot)."]
12443    pub timestamp: u64,
12444    #[doc = "button states or switches of a tracker device"]
12445    pub custom_state: u64,
12446    #[doc = "Latitude (WGS84)"]
12447    pub lat: i32,
12448    #[doc = "Longitude (WGS84)"]
12449    pub lon: i32,
12450    #[doc = "Altitude (MSL)"]
12451    pub alt: f32,
12452    #[doc = "target velocity (0,0,0) for unknown"]
12453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12454    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12455    pub vel: [f32; 3],
12456    #[doc = "linear target acceleration (0,0,0) for unknown"]
12457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12458    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12459    pub acc: [f32; 3],
12460    #[doc = "(0 0 0 0 for unknown)"]
12461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12462    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12463    pub attitude_q: [f32; 4],
12464    #[doc = "(0 0 0 for unknown)"]
12465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12467    pub rates: [f32; 3],
12468    #[doc = "eph epv"]
12469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12471    pub position_cov: [f32; 3],
12472    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12473    pub est_capabilities: u8,
12474}
12475impl FOLLOW_TARGET_DATA {
12476    pub const ENCODED_LEN: usize = 93usize;
12477    pub const DEFAULT: Self = Self {
12478        timestamp: 0_u64,
12479        custom_state: 0_u64,
12480        lat: 0_i32,
12481        lon: 0_i32,
12482        alt: 0.0_f32,
12483        vel: [0.0_f32; 3usize],
12484        acc: [0.0_f32; 3usize],
12485        attitude_q: [0.0_f32; 4usize],
12486        rates: [0.0_f32; 3usize],
12487        position_cov: [0.0_f32; 3usize],
12488        est_capabilities: 0_u8,
12489    };
12490    #[cfg(feature = "arbitrary")]
12491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12492        use arbitrary::{Arbitrary, Unstructured};
12493        let mut buf = [0u8; 1024];
12494        rng.fill_bytes(&mut buf);
12495        let mut unstructured = Unstructured::new(&buf);
12496        Self::arbitrary(&mut unstructured).unwrap_or_default()
12497    }
12498}
12499impl Default for FOLLOW_TARGET_DATA {
12500    fn default() -> Self {
12501        Self::DEFAULT.clone()
12502    }
12503}
12504impl MessageData for FOLLOW_TARGET_DATA {
12505    type Message = MavMessage;
12506    const ID: u32 = 144u32;
12507    const NAME: &'static str = "FOLLOW_TARGET";
12508    const EXTRA_CRC: u8 = 127u8;
12509    const ENCODED_LEN: usize = 93usize;
12510    fn deser(
12511        _version: MavlinkVersion,
12512        __input: &[u8],
12513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12514        let avail_len = __input.len();
12515        let mut payload_buf = [0; Self::ENCODED_LEN];
12516        let mut buf = if avail_len < Self::ENCODED_LEN {
12517            payload_buf[0..avail_len].copy_from_slice(__input);
12518            Bytes::new(&payload_buf)
12519        } else {
12520            Bytes::new(__input)
12521        };
12522        let mut __struct = Self::default();
12523        __struct.timestamp = buf.get_u64_le();
12524        __struct.custom_state = buf.get_u64_le();
12525        __struct.lat = buf.get_i32_le();
12526        __struct.lon = buf.get_i32_le();
12527        __struct.alt = buf.get_f32_le();
12528        for v in &mut __struct.vel {
12529            let val = buf.get_f32_le();
12530            *v = val;
12531        }
12532        for v in &mut __struct.acc {
12533            let val = buf.get_f32_le();
12534            *v = val;
12535        }
12536        for v in &mut __struct.attitude_q {
12537            let val = buf.get_f32_le();
12538            *v = val;
12539        }
12540        for v in &mut __struct.rates {
12541            let val = buf.get_f32_le();
12542            *v = val;
12543        }
12544        for v in &mut __struct.position_cov {
12545            let val = buf.get_f32_le();
12546            *v = val;
12547        }
12548        __struct.est_capabilities = buf.get_u8();
12549        Ok(__struct)
12550    }
12551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12552        let mut __tmp = BytesMut::new(bytes);
12553        #[allow(clippy::absurd_extreme_comparisons)]
12554        #[allow(unused_comparisons)]
12555        if __tmp.remaining() < Self::ENCODED_LEN {
12556            panic!(
12557                "buffer is too small (need {} bytes, but got {})",
12558                Self::ENCODED_LEN,
12559                __tmp.remaining(),
12560            )
12561        }
12562        __tmp.put_u64_le(self.timestamp);
12563        __tmp.put_u64_le(self.custom_state);
12564        __tmp.put_i32_le(self.lat);
12565        __tmp.put_i32_le(self.lon);
12566        __tmp.put_f32_le(self.alt);
12567        for val in &self.vel {
12568            __tmp.put_f32_le(*val);
12569        }
12570        for val in &self.acc {
12571            __tmp.put_f32_le(*val);
12572        }
12573        for val in &self.attitude_q {
12574            __tmp.put_f32_le(*val);
12575        }
12576        for val in &self.rates {
12577            __tmp.put_f32_le(*val);
12578        }
12579        for val in &self.position_cov {
12580            __tmp.put_f32_le(*val);
12581        }
12582        __tmp.put_u8(self.est_capabilities);
12583        if matches!(version, MavlinkVersion::V2) {
12584            let len = __tmp.len();
12585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12586        } else {
12587            __tmp.len()
12588        }
12589    }
12590}
12591#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12592#[doc = ""]
12593#[doc = "ID: 371"]
12594#[derive(Debug, Clone, PartialEq)]
12595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12597#[cfg_attr(feature = "ts", derive(TS))]
12598#[cfg_attr(feature = "ts", ts(export))]
12599pub struct FUEL_STATUS_DATA {
12600    #[doc = "Capacity when full. Must be provided."]
12601    pub maximum_fuel: f32,
12602    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12603    pub consumed_fuel: f32,
12604    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12605    pub remaining_fuel: f32,
12606    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12607    pub flow_rate: f32,
12608    #[doc = "Fuel temperature. NaN: field not provided."]
12609    pub temperature: f32,
12610    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12611    pub fuel_type: MavFuelType,
12612    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12613    pub id: u8,
12614    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12615    pub percent_remaining: u8,
12616}
12617impl FUEL_STATUS_DATA {
12618    pub const ENCODED_LEN: usize = 26usize;
12619    pub const DEFAULT: Self = Self {
12620        maximum_fuel: 0.0_f32,
12621        consumed_fuel: 0.0_f32,
12622        remaining_fuel: 0.0_f32,
12623        flow_rate: 0.0_f32,
12624        temperature: 0.0_f32,
12625        fuel_type: MavFuelType::DEFAULT,
12626        id: 0_u8,
12627        percent_remaining: 0_u8,
12628    };
12629    #[cfg(feature = "arbitrary")]
12630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12631        use arbitrary::{Arbitrary, Unstructured};
12632        let mut buf = [0u8; 1024];
12633        rng.fill_bytes(&mut buf);
12634        let mut unstructured = Unstructured::new(&buf);
12635        Self::arbitrary(&mut unstructured).unwrap_or_default()
12636    }
12637}
12638impl Default for FUEL_STATUS_DATA {
12639    fn default() -> Self {
12640        Self::DEFAULT.clone()
12641    }
12642}
12643impl MessageData for FUEL_STATUS_DATA {
12644    type Message = MavMessage;
12645    const ID: u32 = 371u32;
12646    const NAME: &'static str = "FUEL_STATUS";
12647    const EXTRA_CRC: u8 = 10u8;
12648    const ENCODED_LEN: usize = 26usize;
12649    fn deser(
12650        _version: MavlinkVersion,
12651        __input: &[u8],
12652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12653        let avail_len = __input.len();
12654        let mut payload_buf = [0; Self::ENCODED_LEN];
12655        let mut buf = if avail_len < Self::ENCODED_LEN {
12656            payload_buf[0..avail_len].copy_from_slice(__input);
12657            Bytes::new(&payload_buf)
12658        } else {
12659            Bytes::new(__input)
12660        };
12661        let mut __struct = Self::default();
12662        __struct.maximum_fuel = buf.get_f32_le();
12663        __struct.consumed_fuel = buf.get_f32_le();
12664        __struct.remaining_fuel = buf.get_f32_le();
12665        __struct.flow_rate = buf.get_f32_le();
12666        __struct.temperature = buf.get_f32_le();
12667        let tmp = buf.get_u32_le();
12668        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12669            ::mavlink_core::error::ParserError::InvalidEnum {
12670                enum_type: "MavFuelType",
12671                value: tmp as u64,
12672            },
12673        )?;
12674        __struct.id = buf.get_u8();
12675        __struct.percent_remaining = buf.get_u8();
12676        Ok(__struct)
12677    }
12678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12679        let mut __tmp = BytesMut::new(bytes);
12680        #[allow(clippy::absurd_extreme_comparisons)]
12681        #[allow(unused_comparisons)]
12682        if __tmp.remaining() < Self::ENCODED_LEN {
12683            panic!(
12684                "buffer is too small (need {} bytes, but got {})",
12685                Self::ENCODED_LEN,
12686                __tmp.remaining(),
12687            )
12688        }
12689        __tmp.put_f32_le(self.maximum_fuel);
12690        __tmp.put_f32_le(self.consumed_fuel);
12691        __tmp.put_f32_le(self.remaining_fuel);
12692        __tmp.put_f32_le(self.flow_rate);
12693        __tmp.put_f32_le(self.temperature);
12694        __tmp.put_u32_le(self.fuel_type as u32);
12695        __tmp.put_u8(self.id);
12696        __tmp.put_u8(self.percent_remaining);
12697        if matches!(version, MavlinkVersion::V2) {
12698            let len = __tmp.len();
12699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12700        } else {
12701            __tmp.len()
12702        }
12703    }
12704}
12705#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12706#[doc = ""]
12707#[doc = "ID: 373"]
12708#[derive(Debug, Clone, PartialEq)]
12709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12711#[cfg_attr(feature = "ts", derive(TS))]
12712#[cfg_attr(feature = "ts", ts(export))]
12713pub struct GENERATOR_STATUS_DATA {
12714    #[doc = "Status flags."]
12715    pub status: MavGeneratorStatusFlag,
12716    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12717    pub battery_current: f32,
12718    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12719    pub load_current: f32,
12720    #[doc = "The power being generated. NaN: field not provided"]
12721    pub power_generated: f32,
12722    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12723    pub bus_voltage: f32,
12724    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12725    pub bat_current_setpoint: f32,
12726    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12727    pub runtime: u32,
12728    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12729    pub time_until_maintenance: i32,
12730    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12731    pub generator_speed: u16,
12732    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12733    pub rectifier_temperature: i16,
12734    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12735    pub generator_temperature: i16,
12736}
12737impl GENERATOR_STATUS_DATA {
12738    pub const ENCODED_LEN: usize = 42usize;
12739    pub const DEFAULT: Self = Self {
12740        status: MavGeneratorStatusFlag::DEFAULT,
12741        battery_current: 0.0_f32,
12742        load_current: 0.0_f32,
12743        power_generated: 0.0_f32,
12744        bus_voltage: 0.0_f32,
12745        bat_current_setpoint: 0.0_f32,
12746        runtime: 0_u32,
12747        time_until_maintenance: 0_i32,
12748        generator_speed: 0_u16,
12749        rectifier_temperature: 0_i16,
12750        generator_temperature: 0_i16,
12751    };
12752    #[cfg(feature = "arbitrary")]
12753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12754        use arbitrary::{Arbitrary, Unstructured};
12755        let mut buf = [0u8; 1024];
12756        rng.fill_bytes(&mut buf);
12757        let mut unstructured = Unstructured::new(&buf);
12758        Self::arbitrary(&mut unstructured).unwrap_or_default()
12759    }
12760}
12761impl Default for GENERATOR_STATUS_DATA {
12762    fn default() -> Self {
12763        Self::DEFAULT.clone()
12764    }
12765}
12766impl MessageData for GENERATOR_STATUS_DATA {
12767    type Message = MavMessage;
12768    const ID: u32 = 373u32;
12769    const NAME: &'static str = "GENERATOR_STATUS";
12770    const EXTRA_CRC: u8 = 117u8;
12771    const ENCODED_LEN: usize = 42usize;
12772    fn deser(
12773        _version: MavlinkVersion,
12774        __input: &[u8],
12775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12776        let avail_len = __input.len();
12777        let mut payload_buf = [0; Self::ENCODED_LEN];
12778        let mut buf = if avail_len < Self::ENCODED_LEN {
12779            payload_buf[0..avail_len].copy_from_slice(__input);
12780            Bytes::new(&payload_buf)
12781        } else {
12782            Bytes::new(__input)
12783        };
12784        let mut __struct = Self::default();
12785        let tmp = buf.get_u64_le();
12786        __struct.status = MavGeneratorStatusFlag::from_bits(tmp).ok_or(
12787            ::mavlink_core::error::ParserError::InvalidFlag {
12788                flag_type: "MavGeneratorStatusFlag",
12789                value: tmp as u64,
12790            },
12791        )?;
12792        __struct.battery_current = buf.get_f32_le();
12793        __struct.load_current = buf.get_f32_le();
12794        __struct.power_generated = buf.get_f32_le();
12795        __struct.bus_voltage = buf.get_f32_le();
12796        __struct.bat_current_setpoint = buf.get_f32_le();
12797        __struct.runtime = buf.get_u32_le();
12798        __struct.time_until_maintenance = buf.get_i32_le();
12799        __struct.generator_speed = buf.get_u16_le();
12800        __struct.rectifier_temperature = buf.get_i16_le();
12801        __struct.generator_temperature = buf.get_i16_le();
12802        Ok(__struct)
12803    }
12804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12805        let mut __tmp = BytesMut::new(bytes);
12806        #[allow(clippy::absurd_extreme_comparisons)]
12807        #[allow(unused_comparisons)]
12808        if __tmp.remaining() < Self::ENCODED_LEN {
12809            panic!(
12810                "buffer is too small (need {} bytes, but got {})",
12811                Self::ENCODED_LEN,
12812                __tmp.remaining(),
12813            )
12814        }
12815        __tmp.put_u64_le(self.status.bits());
12816        __tmp.put_f32_le(self.battery_current);
12817        __tmp.put_f32_le(self.load_current);
12818        __tmp.put_f32_le(self.power_generated);
12819        __tmp.put_f32_le(self.bus_voltage);
12820        __tmp.put_f32_le(self.bat_current_setpoint);
12821        __tmp.put_u32_le(self.runtime);
12822        __tmp.put_i32_le(self.time_until_maintenance);
12823        __tmp.put_u16_le(self.generator_speed);
12824        __tmp.put_i16_le(self.rectifier_temperature);
12825        __tmp.put_i16_le(self.generator_temperature);
12826        if matches!(version, MavlinkVersion::V2) {
12827            let len = __tmp.len();
12828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12829        } else {
12830            __tmp.len()
12831        }
12832    }
12833}
12834#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12835#[doc = ""]
12836#[doc = "ID: 285"]
12837#[derive(Debug, Clone, PartialEq)]
12838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12840#[cfg_attr(feature = "ts", derive(TS))]
12841#[cfg_attr(feature = "ts", ts(export))]
12842pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12843    #[doc = "Timestamp (time since system boot)."]
12844    pub time_boot_ms: u32,
12845    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12848    pub q: [f32; 4],
12849    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12850    pub angular_velocity_x: f32,
12851    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12852    pub angular_velocity_y: f32,
12853    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12854    pub angular_velocity_z: f32,
12855    #[doc = "Failure flags (0 for no failure)"]
12856    pub failure_flags: GimbalDeviceErrorFlags,
12857    #[doc = "Current gimbal flags set."]
12858    pub flags: GimbalDeviceFlags,
12859    #[doc = "System ID"]
12860    pub target_system: u8,
12861    #[doc = "Component ID"]
12862    pub target_component: u8,
12863    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12864    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12865    pub delta_yaw: f32,
12866    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12867    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12868    pub delta_yaw_velocity: f32,
12869    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12870    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12871    pub gimbal_device_id: u8,
12872}
12873impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12874    pub const ENCODED_LEN: usize = 49usize;
12875    pub const DEFAULT: Self = Self {
12876        time_boot_ms: 0_u32,
12877        q: [0.0_f32; 4usize],
12878        angular_velocity_x: 0.0_f32,
12879        angular_velocity_y: 0.0_f32,
12880        angular_velocity_z: 0.0_f32,
12881        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12882        flags: GimbalDeviceFlags::DEFAULT,
12883        target_system: 0_u8,
12884        target_component: 0_u8,
12885        delta_yaw: 0.0_f32,
12886        delta_yaw_velocity: 0.0_f32,
12887        gimbal_device_id: 0_u8,
12888    };
12889    #[cfg(feature = "arbitrary")]
12890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12891        use arbitrary::{Arbitrary, Unstructured};
12892        let mut buf = [0u8; 1024];
12893        rng.fill_bytes(&mut buf);
12894        let mut unstructured = Unstructured::new(&buf);
12895        Self::arbitrary(&mut unstructured).unwrap_or_default()
12896    }
12897}
12898impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12899    fn default() -> Self {
12900        Self::DEFAULT.clone()
12901    }
12902}
12903impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12904    type Message = MavMessage;
12905    const ID: u32 = 285u32;
12906    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12907    const EXTRA_CRC: u8 = 137u8;
12908    const ENCODED_LEN: usize = 49usize;
12909    fn deser(
12910        _version: MavlinkVersion,
12911        __input: &[u8],
12912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12913        let avail_len = __input.len();
12914        let mut payload_buf = [0; Self::ENCODED_LEN];
12915        let mut buf = if avail_len < Self::ENCODED_LEN {
12916            payload_buf[0..avail_len].copy_from_slice(__input);
12917            Bytes::new(&payload_buf)
12918        } else {
12919            Bytes::new(__input)
12920        };
12921        let mut __struct = Self::default();
12922        __struct.time_boot_ms = buf.get_u32_le();
12923        for v in &mut __struct.q {
12924            let val = buf.get_f32_le();
12925            *v = val;
12926        }
12927        __struct.angular_velocity_x = buf.get_f32_le();
12928        __struct.angular_velocity_y = buf.get_f32_le();
12929        __struct.angular_velocity_z = buf.get_f32_le();
12930        let tmp = buf.get_u32_le();
12931        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(tmp).ok_or(
12932            ::mavlink_core::error::ParserError::InvalidFlag {
12933                flag_type: "GimbalDeviceErrorFlags",
12934                value: tmp as u64,
12935            },
12936        )?;
12937        let tmp = buf.get_u16_le();
12938        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
12939            ::mavlink_core::error::ParserError::InvalidFlag {
12940                flag_type: "GimbalDeviceFlags",
12941                value: tmp as u64,
12942            },
12943        )?;
12944        __struct.target_system = buf.get_u8();
12945        __struct.target_component = buf.get_u8();
12946        __struct.delta_yaw = buf.get_f32_le();
12947        __struct.delta_yaw_velocity = buf.get_f32_le();
12948        __struct.gimbal_device_id = buf.get_u8();
12949        Ok(__struct)
12950    }
12951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12952        let mut __tmp = BytesMut::new(bytes);
12953        #[allow(clippy::absurd_extreme_comparisons)]
12954        #[allow(unused_comparisons)]
12955        if __tmp.remaining() < Self::ENCODED_LEN {
12956            panic!(
12957                "buffer is too small (need {} bytes, but got {})",
12958                Self::ENCODED_LEN,
12959                __tmp.remaining(),
12960            )
12961        }
12962        __tmp.put_u32_le(self.time_boot_ms);
12963        for val in &self.q {
12964            __tmp.put_f32_le(*val);
12965        }
12966        __tmp.put_f32_le(self.angular_velocity_x);
12967        __tmp.put_f32_le(self.angular_velocity_y);
12968        __tmp.put_f32_le(self.angular_velocity_z);
12969        __tmp.put_u32_le(self.failure_flags.bits());
12970        __tmp.put_u16_le(self.flags.bits());
12971        __tmp.put_u8(self.target_system);
12972        __tmp.put_u8(self.target_component);
12973        if matches!(version, MavlinkVersion::V2) {
12974            __tmp.put_f32_le(self.delta_yaw);
12975            __tmp.put_f32_le(self.delta_yaw_velocity);
12976            __tmp.put_u8(self.gimbal_device_id);
12977            let len = __tmp.len();
12978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12979        } else {
12980            __tmp.len()
12981        }
12982    }
12983}
12984#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12985#[doc = ""]
12986#[doc = "ID: 283"]
12987#[derive(Debug, Clone, PartialEq)]
12988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12990#[cfg_attr(feature = "ts", derive(TS))]
12991#[cfg_attr(feature = "ts", ts(export))]
12992pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12993    #[doc = "UID of gimbal hardware (0 if unknown)."]
12994    pub uid: u64,
12995    #[doc = "Timestamp (time since system boot)."]
12996    pub time_boot_ms: u32,
12997    #[doc = "0xff)."]
12998    pub firmware_version: u32,
12999    #[doc = "0xff)."]
13000    pub hardware_version: u32,
13001    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13002    pub roll_min: f32,
13003    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13004    pub roll_max: f32,
13005    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13006    pub pitch_min: f32,
13007    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13008    pub pitch_max: f32,
13009    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13010    pub yaw_min: f32,
13011    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13012    pub yaw_max: f32,
13013    #[doc = "Bitmap of gimbal capability flags."]
13014    pub cap_flags: GimbalDeviceCapFlags,
13015    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13016    pub custom_cap_flags: u16,
13017    #[doc = "Name of the gimbal vendor."]
13018    #[cfg_attr(feature = "ts", ts(type = "string"))]
13019    pub vendor_name: CharArray<32>,
13020    #[doc = "Name of the gimbal model."]
13021    #[cfg_attr(feature = "ts", ts(type = "string"))]
13022    pub model_name: CharArray<32>,
13023    #[doc = "Custom name of the gimbal given to it by the user."]
13024    #[cfg_attr(feature = "ts", ts(type = "string"))]
13025    pub custom_name: CharArray<32>,
13026    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13027    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13028    pub gimbal_device_id: u8,
13029}
13030impl GIMBAL_DEVICE_INFORMATION_DATA {
13031    pub const ENCODED_LEN: usize = 145usize;
13032    pub const DEFAULT: Self = Self {
13033        uid: 0_u64,
13034        time_boot_ms: 0_u32,
13035        firmware_version: 0_u32,
13036        hardware_version: 0_u32,
13037        roll_min: 0.0_f32,
13038        roll_max: 0.0_f32,
13039        pitch_min: 0.0_f32,
13040        pitch_max: 0.0_f32,
13041        yaw_min: 0.0_f32,
13042        yaw_max: 0.0_f32,
13043        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13044        custom_cap_flags: 0_u16,
13045        vendor_name: CharArray::new([0_u8; 32usize]),
13046        model_name: CharArray::new([0_u8; 32usize]),
13047        custom_name: CharArray::new([0_u8; 32usize]),
13048        gimbal_device_id: 0_u8,
13049    };
13050    #[cfg(feature = "arbitrary")]
13051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13052        use arbitrary::{Arbitrary, Unstructured};
13053        let mut buf = [0u8; 1024];
13054        rng.fill_bytes(&mut buf);
13055        let mut unstructured = Unstructured::new(&buf);
13056        Self::arbitrary(&mut unstructured).unwrap_or_default()
13057    }
13058}
13059impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13060    fn default() -> Self {
13061        Self::DEFAULT.clone()
13062    }
13063}
13064impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13065    type Message = MavMessage;
13066    const ID: u32 = 283u32;
13067    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13068    const EXTRA_CRC: u8 = 74u8;
13069    const ENCODED_LEN: usize = 145usize;
13070    fn deser(
13071        _version: MavlinkVersion,
13072        __input: &[u8],
13073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13074        let avail_len = __input.len();
13075        let mut payload_buf = [0; Self::ENCODED_LEN];
13076        let mut buf = if avail_len < Self::ENCODED_LEN {
13077            payload_buf[0..avail_len].copy_from_slice(__input);
13078            Bytes::new(&payload_buf)
13079        } else {
13080            Bytes::new(__input)
13081        };
13082        let mut __struct = Self::default();
13083        __struct.uid = buf.get_u64_le();
13084        __struct.time_boot_ms = buf.get_u32_le();
13085        __struct.firmware_version = buf.get_u32_le();
13086        __struct.hardware_version = buf.get_u32_le();
13087        __struct.roll_min = buf.get_f32_le();
13088        __struct.roll_max = buf.get_f32_le();
13089        __struct.pitch_min = buf.get_f32_le();
13090        __struct.pitch_max = buf.get_f32_le();
13091        __struct.yaw_min = buf.get_f32_le();
13092        __struct.yaw_max = buf.get_f32_le();
13093        let tmp = buf.get_u16_le();
13094        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(tmp).ok_or(
13095            ::mavlink_core::error::ParserError::InvalidFlag {
13096                flag_type: "GimbalDeviceCapFlags",
13097                value: tmp as u64,
13098            },
13099        )?;
13100        __struct.custom_cap_flags = buf.get_u16_le();
13101        let mut tmp = [0_u8; 32usize];
13102        for v in &mut tmp {
13103            *v = buf.get_u8();
13104        }
13105        __struct.vendor_name = CharArray::new(tmp);
13106        let mut tmp = [0_u8; 32usize];
13107        for v in &mut tmp {
13108            *v = buf.get_u8();
13109        }
13110        __struct.model_name = CharArray::new(tmp);
13111        let mut tmp = [0_u8; 32usize];
13112        for v in &mut tmp {
13113            *v = buf.get_u8();
13114        }
13115        __struct.custom_name = CharArray::new(tmp);
13116        __struct.gimbal_device_id = buf.get_u8();
13117        Ok(__struct)
13118    }
13119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13120        let mut __tmp = BytesMut::new(bytes);
13121        #[allow(clippy::absurd_extreme_comparisons)]
13122        #[allow(unused_comparisons)]
13123        if __tmp.remaining() < Self::ENCODED_LEN {
13124            panic!(
13125                "buffer is too small (need {} bytes, but got {})",
13126                Self::ENCODED_LEN,
13127                __tmp.remaining(),
13128            )
13129        }
13130        __tmp.put_u64_le(self.uid);
13131        __tmp.put_u32_le(self.time_boot_ms);
13132        __tmp.put_u32_le(self.firmware_version);
13133        __tmp.put_u32_le(self.hardware_version);
13134        __tmp.put_f32_le(self.roll_min);
13135        __tmp.put_f32_le(self.roll_max);
13136        __tmp.put_f32_le(self.pitch_min);
13137        __tmp.put_f32_le(self.pitch_max);
13138        __tmp.put_f32_le(self.yaw_min);
13139        __tmp.put_f32_le(self.yaw_max);
13140        __tmp.put_u16_le(self.cap_flags.bits());
13141        __tmp.put_u16_le(self.custom_cap_flags);
13142        for val in &self.vendor_name {
13143            __tmp.put_u8(*val);
13144        }
13145        for val in &self.model_name {
13146            __tmp.put_u8(*val);
13147        }
13148        for val in &self.custom_name {
13149            __tmp.put_u8(*val);
13150        }
13151        if matches!(version, MavlinkVersion::V2) {
13152            __tmp.put_u8(self.gimbal_device_id);
13153            let len = __tmp.len();
13154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13155        } else {
13156            __tmp.len()
13157        }
13158    }
13159}
13160#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13161#[doc = ""]
13162#[doc = "ID: 284"]
13163#[derive(Debug, Clone, PartialEq)]
13164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13166#[cfg_attr(feature = "ts", derive(TS))]
13167#[cfg_attr(feature = "ts", ts(export))]
13168pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13169    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13172    pub q: [f32; 4],
13173    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13174    pub angular_velocity_x: f32,
13175    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13176    pub angular_velocity_y: f32,
13177    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13178    pub angular_velocity_z: f32,
13179    #[doc = "Low level gimbal flags."]
13180    pub flags: GimbalDeviceFlags,
13181    #[doc = "System ID"]
13182    pub target_system: u8,
13183    #[doc = "Component ID"]
13184    pub target_component: u8,
13185}
13186impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13187    pub const ENCODED_LEN: usize = 32usize;
13188    pub const DEFAULT: Self = Self {
13189        q: [0.0_f32; 4usize],
13190        angular_velocity_x: 0.0_f32,
13191        angular_velocity_y: 0.0_f32,
13192        angular_velocity_z: 0.0_f32,
13193        flags: GimbalDeviceFlags::DEFAULT,
13194        target_system: 0_u8,
13195        target_component: 0_u8,
13196    };
13197    #[cfg(feature = "arbitrary")]
13198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13199        use arbitrary::{Arbitrary, Unstructured};
13200        let mut buf = [0u8; 1024];
13201        rng.fill_bytes(&mut buf);
13202        let mut unstructured = Unstructured::new(&buf);
13203        Self::arbitrary(&mut unstructured).unwrap_or_default()
13204    }
13205}
13206impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13207    fn default() -> Self {
13208        Self::DEFAULT.clone()
13209    }
13210}
13211impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13212    type Message = MavMessage;
13213    const ID: u32 = 284u32;
13214    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13215    const EXTRA_CRC: u8 = 99u8;
13216    const ENCODED_LEN: usize = 32usize;
13217    fn deser(
13218        _version: MavlinkVersion,
13219        __input: &[u8],
13220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13221        let avail_len = __input.len();
13222        let mut payload_buf = [0; Self::ENCODED_LEN];
13223        let mut buf = if avail_len < Self::ENCODED_LEN {
13224            payload_buf[0..avail_len].copy_from_slice(__input);
13225            Bytes::new(&payload_buf)
13226        } else {
13227            Bytes::new(__input)
13228        };
13229        let mut __struct = Self::default();
13230        for v in &mut __struct.q {
13231            let val = buf.get_f32_le();
13232            *v = val;
13233        }
13234        __struct.angular_velocity_x = buf.get_f32_le();
13235        __struct.angular_velocity_y = buf.get_f32_le();
13236        __struct.angular_velocity_z = buf.get_f32_le();
13237        let tmp = buf.get_u16_le();
13238        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
13239            ::mavlink_core::error::ParserError::InvalidFlag {
13240                flag_type: "GimbalDeviceFlags",
13241                value: tmp as u64,
13242            },
13243        )?;
13244        __struct.target_system = buf.get_u8();
13245        __struct.target_component = buf.get_u8();
13246        Ok(__struct)
13247    }
13248    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13249        let mut __tmp = BytesMut::new(bytes);
13250        #[allow(clippy::absurd_extreme_comparisons)]
13251        #[allow(unused_comparisons)]
13252        if __tmp.remaining() < Self::ENCODED_LEN {
13253            panic!(
13254                "buffer is too small (need {} bytes, but got {})",
13255                Self::ENCODED_LEN,
13256                __tmp.remaining(),
13257            )
13258        }
13259        for val in &self.q {
13260            __tmp.put_f32_le(*val);
13261        }
13262        __tmp.put_f32_le(self.angular_velocity_x);
13263        __tmp.put_f32_le(self.angular_velocity_y);
13264        __tmp.put_f32_le(self.angular_velocity_z);
13265        __tmp.put_u16_le(self.flags.bits());
13266        __tmp.put_u8(self.target_system);
13267        __tmp.put_u8(self.target_component);
13268        if matches!(version, MavlinkVersion::V2) {
13269            let len = __tmp.len();
13270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13271        } else {
13272            __tmp.len()
13273        }
13274    }
13275}
13276#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13277#[doc = ""]
13278#[doc = "ID: 280"]
13279#[derive(Debug, Clone, PartialEq)]
13280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13282#[cfg_attr(feature = "ts", derive(TS))]
13283#[cfg_attr(feature = "ts", ts(export))]
13284pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13285    #[doc = "Timestamp (time since system boot)."]
13286    pub time_boot_ms: u32,
13287    #[doc = "Bitmap of gimbal capability flags."]
13288    pub cap_flags: GimbalManagerCapFlags,
13289    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13290    pub roll_min: f32,
13291    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13292    pub roll_max: f32,
13293    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13294    pub pitch_min: f32,
13295    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13296    pub pitch_max: f32,
13297    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13298    pub yaw_min: f32,
13299    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13300    pub yaw_max: f32,
13301    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13302    pub gimbal_device_id: u8,
13303}
13304impl GIMBAL_MANAGER_INFORMATION_DATA {
13305    pub const ENCODED_LEN: usize = 33usize;
13306    pub const DEFAULT: Self = Self {
13307        time_boot_ms: 0_u32,
13308        cap_flags: GimbalManagerCapFlags::DEFAULT,
13309        roll_min: 0.0_f32,
13310        roll_max: 0.0_f32,
13311        pitch_min: 0.0_f32,
13312        pitch_max: 0.0_f32,
13313        yaw_min: 0.0_f32,
13314        yaw_max: 0.0_f32,
13315        gimbal_device_id: 0_u8,
13316    };
13317    #[cfg(feature = "arbitrary")]
13318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13319        use arbitrary::{Arbitrary, Unstructured};
13320        let mut buf = [0u8; 1024];
13321        rng.fill_bytes(&mut buf);
13322        let mut unstructured = Unstructured::new(&buf);
13323        Self::arbitrary(&mut unstructured).unwrap_or_default()
13324    }
13325}
13326impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13327    fn default() -> Self {
13328        Self::DEFAULT.clone()
13329    }
13330}
13331impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13332    type Message = MavMessage;
13333    const ID: u32 = 280u32;
13334    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13335    const EXTRA_CRC: u8 = 70u8;
13336    const ENCODED_LEN: usize = 33usize;
13337    fn deser(
13338        _version: MavlinkVersion,
13339        __input: &[u8],
13340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13341        let avail_len = __input.len();
13342        let mut payload_buf = [0; Self::ENCODED_LEN];
13343        let mut buf = if avail_len < Self::ENCODED_LEN {
13344            payload_buf[0..avail_len].copy_from_slice(__input);
13345            Bytes::new(&payload_buf)
13346        } else {
13347            Bytes::new(__input)
13348        };
13349        let mut __struct = Self::default();
13350        __struct.time_boot_ms = buf.get_u32_le();
13351        let tmp = buf.get_u32_le();
13352        __struct.cap_flags = GimbalManagerCapFlags::from_bits(tmp).ok_or(
13353            ::mavlink_core::error::ParserError::InvalidFlag {
13354                flag_type: "GimbalManagerCapFlags",
13355                value: tmp as u64,
13356            },
13357        )?;
13358        __struct.roll_min = buf.get_f32_le();
13359        __struct.roll_max = buf.get_f32_le();
13360        __struct.pitch_min = buf.get_f32_le();
13361        __struct.pitch_max = buf.get_f32_le();
13362        __struct.yaw_min = buf.get_f32_le();
13363        __struct.yaw_max = buf.get_f32_le();
13364        __struct.gimbal_device_id = buf.get_u8();
13365        Ok(__struct)
13366    }
13367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13368        let mut __tmp = BytesMut::new(bytes);
13369        #[allow(clippy::absurd_extreme_comparisons)]
13370        #[allow(unused_comparisons)]
13371        if __tmp.remaining() < Self::ENCODED_LEN {
13372            panic!(
13373                "buffer is too small (need {} bytes, but got {})",
13374                Self::ENCODED_LEN,
13375                __tmp.remaining(),
13376            )
13377        }
13378        __tmp.put_u32_le(self.time_boot_ms);
13379        __tmp.put_u32_le(self.cap_flags.bits());
13380        __tmp.put_f32_le(self.roll_min);
13381        __tmp.put_f32_le(self.roll_max);
13382        __tmp.put_f32_le(self.pitch_min);
13383        __tmp.put_f32_le(self.pitch_max);
13384        __tmp.put_f32_le(self.yaw_min);
13385        __tmp.put_f32_le(self.yaw_max);
13386        __tmp.put_u8(self.gimbal_device_id);
13387        if matches!(version, MavlinkVersion::V2) {
13388            let len = __tmp.len();
13389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13390        } else {
13391            __tmp.len()
13392        }
13393    }
13394}
13395#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13396#[doc = ""]
13397#[doc = "ID: 282"]
13398#[derive(Debug, Clone, PartialEq)]
13399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13401#[cfg_attr(feature = "ts", derive(TS))]
13402#[cfg_attr(feature = "ts", ts(export))]
13403pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13404    #[doc = "High level gimbal manager flags to use."]
13405    pub flags: GimbalManagerFlags,
13406    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13409    pub q: [f32; 4],
13410    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13411    pub angular_velocity_x: f32,
13412    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13413    pub angular_velocity_y: f32,
13414    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13415    pub angular_velocity_z: f32,
13416    #[doc = "System ID"]
13417    pub target_system: u8,
13418    #[doc = "Component ID"]
13419    pub target_component: u8,
13420    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13421    pub gimbal_device_id: u8,
13422}
13423impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13424    pub const ENCODED_LEN: usize = 35usize;
13425    pub const DEFAULT: Self = Self {
13426        flags: GimbalManagerFlags::DEFAULT,
13427        q: [0.0_f32; 4usize],
13428        angular_velocity_x: 0.0_f32,
13429        angular_velocity_y: 0.0_f32,
13430        angular_velocity_z: 0.0_f32,
13431        target_system: 0_u8,
13432        target_component: 0_u8,
13433        gimbal_device_id: 0_u8,
13434    };
13435    #[cfg(feature = "arbitrary")]
13436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13437        use arbitrary::{Arbitrary, Unstructured};
13438        let mut buf = [0u8; 1024];
13439        rng.fill_bytes(&mut buf);
13440        let mut unstructured = Unstructured::new(&buf);
13441        Self::arbitrary(&mut unstructured).unwrap_or_default()
13442    }
13443}
13444impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13445    fn default() -> Self {
13446        Self::DEFAULT.clone()
13447    }
13448}
13449impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13450    type Message = MavMessage;
13451    const ID: u32 = 282u32;
13452    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13453    const EXTRA_CRC: u8 = 123u8;
13454    const ENCODED_LEN: usize = 35usize;
13455    fn deser(
13456        _version: MavlinkVersion,
13457        __input: &[u8],
13458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13459        let avail_len = __input.len();
13460        let mut payload_buf = [0; Self::ENCODED_LEN];
13461        let mut buf = if avail_len < Self::ENCODED_LEN {
13462            payload_buf[0..avail_len].copy_from_slice(__input);
13463            Bytes::new(&payload_buf)
13464        } else {
13465            Bytes::new(__input)
13466        };
13467        let mut __struct = Self::default();
13468        let tmp = buf.get_u32_le();
13469        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13470            ::mavlink_core::error::ParserError::InvalidFlag {
13471                flag_type: "GimbalManagerFlags",
13472                value: tmp as u64,
13473            },
13474        )?;
13475        for v in &mut __struct.q {
13476            let val = buf.get_f32_le();
13477            *v = val;
13478        }
13479        __struct.angular_velocity_x = buf.get_f32_le();
13480        __struct.angular_velocity_y = buf.get_f32_le();
13481        __struct.angular_velocity_z = buf.get_f32_le();
13482        __struct.target_system = buf.get_u8();
13483        __struct.target_component = buf.get_u8();
13484        __struct.gimbal_device_id = buf.get_u8();
13485        Ok(__struct)
13486    }
13487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13488        let mut __tmp = BytesMut::new(bytes);
13489        #[allow(clippy::absurd_extreme_comparisons)]
13490        #[allow(unused_comparisons)]
13491        if __tmp.remaining() < Self::ENCODED_LEN {
13492            panic!(
13493                "buffer is too small (need {} bytes, but got {})",
13494                Self::ENCODED_LEN,
13495                __tmp.remaining(),
13496            )
13497        }
13498        __tmp.put_u32_le(self.flags.bits());
13499        for val in &self.q {
13500            __tmp.put_f32_le(*val);
13501        }
13502        __tmp.put_f32_le(self.angular_velocity_x);
13503        __tmp.put_f32_le(self.angular_velocity_y);
13504        __tmp.put_f32_le(self.angular_velocity_z);
13505        __tmp.put_u8(self.target_system);
13506        __tmp.put_u8(self.target_component);
13507        __tmp.put_u8(self.gimbal_device_id);
13508        if matches!(version, MavlinkVersion::V2) {
13509            let len = __tmp.len();
13510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13511        } else {
13512            __tmp.len()
13513        }
13514    }
13515}
13516#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13517#[doc = ""]
13518#[doc = "ID: 288"]
13519#[derive(Debug, Clone, PartialEq)]
13520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13522#[cfg_attr(feature = "ts", derive(TS))]
13523#[cfg_attr(feature = "ts", ts(export))]
13524pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13525    #[doc = "High level gimbal manager flags."]
13526    pub flags: GimbalManagerFlags,
13527    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13528    pub pitch: f32,
13529    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13530    pub yaw: f32,
13531    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13532    pub pitch_rate: f32,
13533    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13534    pub yaw_rate: f32,
13535    #[doc = "System ID"]
13536    pub target_system: u8,
13537    #[doc = "Component ID"]
13538    pub target_component: u8,
13539    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13540    pub gimbal_device_id: u8,
13541}
13542impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13543    pub const ENCODED_LEN: usize = 23usize;
13544    pub const DEFAULT: Self = Self {
13545        flags: GimbalManagerFlags::DEFAULT,
13546        pitch: 0.0_f32,
13547        yaw: 0.0_f32,
13548        pitch_rate: 0.0_f32,
13549        yaw_rate: 0.0_f32,
13550        target_system: 0_u8,
13551        target_component: 0_u8,
13552        gimbal_device_id: 0_u8,
13553    };
13554    #[cfg(feature = "arbitrary")]
13555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13556        use arbitrary::{Arbitrary, Unstructured};
13557        let mut buf = [0u8; 1024];
13558        rng.fill_bytes(&mut buf);
13559        let mut unstructured = Unstructured::new(&buf);
13560        Self::arbitrary(&mut unstructured).unwrap_or_default()
13561    }
13562}
13563impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13564    fn default() -> Self {
13565        Self::DEFAULT.clone()
13566    }
13567}
13568impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13569    type Message = MavMessage;
13570    const ID: u32 = 288u32;
13571    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13572    const EXTRA_CRC: u8 = 20u8;
13573    const ENCODED_LEN: usize = 23usize;
13574    fn deser(
13575        _version: MavlinkVersion,
13576        __input: &[u8],
13577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13578        let avail_len = __input.len();
13579        let mut payload_buf = [0; Self::ENCODED_LEN];
13580        let mut buf = if avail_len < Self::ENCODED_LEN {
13581            payload_buf[0..avail_len].copy_from_slice(__input);
13582            Bytes::new(&payload_buf)
13583        } else {
13584            Bytes::new(__input)
13585        };
13586        let mut __struct = Self::default();
13587        let tmp = buf.get_u32_le();
13588        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13589            ::mavlink_core::error::ParserError::InvalidFlag {
13590                flag_type: "GimbalManagerFlags",
13591                value: tmp as u64,
13592            },
13593        )?;
13594        __struct.pitch = buf.get_f32_le();
13595        __struct.yaw = buf.get_f32_le();
13596        __struct.pitch_rate = buf.get_f32_le();
13597        __struct.yaw_rate = buf.get_f32_le();
13598        __struct.target_system = buf.get_u8();
13599        __struct.target_component = buf.get_u8();
13600        __struct.gimbal_device_id = buf.get_u8();
13601        Ok(__struct)
13602    }
13603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13604        let mut __tmp = BytesMut::new(bytes);
13605        #[allow(clippy::absurd_extreme_comparisons)]
13606        #[allow(unused_comparisons)]
13607        if __tmp.remaining() < Self::ENCODED_LEN {
13608            panic!(
13609                "buffer is too small (need {} bytes, but got {})",
13610                Self::ENCODED_LEN,
13611                __tmp.remaining(),
13612            )
13613        }
13614        __tmp.put_u32_le(self.flags.bits());
13615        __tmp.put_f32_le(self.pitch);
13616        __tmp.put_f32_le(self.yaw);
13617        __tmp.put_f32_le(self.pitch_rate);
13618        __tmp.put_f32_le(self.yaw_rate);
13619        __tmp.put_u8(self.target_system);
13620        __tmp.put_u8(self.target_component);
13621        __tmp.put_u8(self.gimbal_device_id);
13622        if matches!(version, MavlinkVersion::V2) {
13623            let len = __tmp.len();
13624            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13625        } else {
13626            __tmp.len()
13627        }
13628    }
13629}
13630#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13631#[doc = ""]
13632#[doc = "ID: 287"]
13633#[derive(Debug, Clone, PartialEq)]
13634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13636#[cfg_attr(feature = "ts", derive(TS))]
13637#[cfg_attr(feature = "ts", ts(export))]
13638pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13639    #[doc = "High level gimbal manager flags to use."]
13640    pub flags: GimbalManagerFlags,
13641    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13642    pub pitch: f32,
13643    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13644    pub yaw: f32,
13645    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13646    pub pitch_rate: f32,
13647    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13648    pub yaw_rate: f32,
13649    #[doc = "System ID"]
13650    pub target_system: u8,
13651    #[doc = "Component ID"]
13652    pub target_component: u8,
13653    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13654    pub gimbal_device_id: u8,
13655}
13656impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13657    pub const ENCODED_LEN: usize = 23usize;
13658    pub const DEFAULT: Self = Self {
13659        flags: GimbalManagerFlags::DEFAULT,
13660        pitch: 0.0_f32,
13661        yaw: 0.0_f32,
13662        pitch_rate: 0.0_f32,
13663        yaw_rate: 0.0_f32,
13664        target_system: 0_u8,
13665        target_component: 0_u8,
13666        gimbal_device_id: 0_u8,
13667    };
13668    #[cfg(feature = "arbitrary")]
13669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13670        use arbitrary::{Arbitrary, Unstructured};
13671        let mut buf = [0u8; 1024];
13672        rng.fill_bytes(&mut buf);
13673        let mut unstructured = Unstructured::new(&buf);
13674        Self::arbitrary(&mut unstructured).unwrap_or_default()
13675    }
13676}
13677impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13678    fn default() -> Self {
13679        Self::DEFAULT.clone()
13680    }
13681}
13682impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13683    type Message = MavMessage;
13684    const ID: u32 = 287u32;
13685    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13686    const EXTRA_CRC: u8 = 1u8;
13687    const ENCODED_LEN: usize = 23usize;
13688    fn deser(
13689        _version: MavlinkVersion,
13690        __input: &[u8],
13691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13692        let avail_len = __input.len();
13693        let mut payload_buf = [0; Self::ENCODED_LEN];
13694        let mut buf = if avail_len < Self::ENCODED_LEN {
13695            payload_buf[0..avail_len].copy_from_slice(__input);
13696            Bytes::new(&payload_buf)
13697        } else {
13698            Bytes::new(__input)
13699        };
13700        let mut __struct = Self::default();
13701        let tmp = buf.get_u32_le();
13702        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13703            ::mavlink_core::error::ParserError::InvalidFlag {
13704                flag_type: "GimbalManagerFlags",
13705                value: tmp as u64,
13706            },
13707        )?;
13708        __struct.pitch = buf.get_f32_le();
13709        __struct.yaw = buf.get_f32_le();
13710        __struct.pitch_rate = buf.get_f32_le();
13711        __struct.yaw_rate = buf.get_f32_le();
13712        __struct.target_system = buf.get_u8();
13713        __struct.target_component = buf.get_u8();
13714        __struct.gimbal_device_id = buf.get_u8();
13715        Ok(__struct)
13716    }
13717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13718        let mut __tmp = BytesMut::new(bytes);
13719        #[allow(clippy::absurd_extreme_comparisons)]
13720        #[allow(unused_comparisons)]
13721        if __tmp.remaining() < Self::ENCODED_LEN {
13722            panic!(
13723                "buffer is too small (need {} bytes, but got {})",
13724                Self::ENCODED_LEN,
13725                __tmp.remaining(),
13726            )
13727        }
13728        __tmp.put_u32_le(self.flags.bits());
13729        __tmp.put_f32_le(self.pitch);
13730        __tmp.put_f32_le(self.yaw);
13731        __tmp.put_f32_le(self.pitch_rate);
13732        __tmp.put_f32_le(self.yaw_rate);
13733        __tmp.put_u8(self.target_system);
13734        __tmp.put_u8(self.target_component);
13735        __tmp.put_u8(self.gimbal_device_id);
13736        if matches!(version, MavlinkVersion::V2) {
13737            let len = __tmp.len();
13738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13739        } else {
13740            __tmp.len()
13741        }
13742    }
13743}
13744#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13745#[doc = ""]
13746#[doc = "ID: 281"]
13747#[derive(Debug, Clone, PartialEq)]
13748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13750#[cfg_attr(feature = "ts", derive(TS))]
13751#[cfg_attr(feature = "ts", ts(export))]
13752pub struct GIMBAL_MANAGER_STATUS_DATA {
13753    #[doc = "Timestamp (time since system boot)."]
13754    pub time_boot_ms: u32,
13755    #[doc = "High level gimbal manager flags currently applied."]
13756    pub flags: GimbalManagerFlags,
13757    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13758    pub gimbal_device_id: u8,
13759    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13760    pub primary_control_sysid: u8,
13761    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13762    pub primary_control_compid: u8,
13763    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13764    pub secondary_control_sysid: u8,
13765    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13766    pub secondary_control_compid: u8,
13767}
13768impl GIMBAL_MANAGER_STATUS_DATA {
13769    pub const ENCODED_LEN: usize = 13usize;
13770    pub const DEFAULT: Self = Self {
13771        time_boot_ms: 0_u32,
13772        flags: GimbalManagerFlags::DEFAULT,
13773        gimbal_device_id: 0_u8,
13774        primary_control_sysid: 0_u8,
13775        primary_control_compid: 0_u8,
13776        secondary_control_sysid: 0_u8,
13777        secondary_control_compid: 0_u8,
13778    };
13779    #[cfg(feature = "arbitrary")]
13780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13781        use arbitrary::{Arbitrary, Unstructured};
13782        let mut buf = [0u8; 1024];
13783        rng.fill_bytes(&mut buf);
13784        let mut unstructured = Unstructured::new(&buf);
13785        Self::arbitrary(&mut unstructured).unwrap_or_default()
13786    }
13787}
13788impl Default for GIMBAL_MANAGER_STATUS_DATA {
13789    fn default() -> Self {
13790        Self::DEFAULT.clone()
13791    }
13792}
13793impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13794    type Message = MavMessage;
13795    const ID: u32 = 281u32;
13796    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13797    const EXTRA_CRC: u8 = 48u8;
13798    const ENCODED_LEN: usize = 13usize;
13799    fn deser(
13800        _version: MavlinkVersion,
13801        __input: &[u8],
13802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13803        let avail_len = __input.len();
13804        let mut payload_buf = [0; Self::ENCODED_LEN];
13805        let mut buf = if avail_len < Self::ENCODED_LEN {
13806            payload_buf[0..avail_len].copy_from_slice(__input);
13807            Bytes::new(&payload_buf)
13808        } else {
13809            Bytes::new(__input)
13810        };
13811        let mut __struct = Self::default();
13812        __struct.time_boot_ms = buf.get_u32_le();
13813        let tmp = buf.get_u32_le();
13814        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13815            ::mavlink_core::error::ParserError::InvalidFlag {
13816                flag_type: "GimbalManagerFlags",
13817                value: tmp as u64,
13818            },
13819        )?;
13820        __struct.gimbal_device_id = buf.get_u8();
13821        __struct.primary_control_sysid = buf.get_u8();
13822        __struct.primary_control_compid = buf.get_u8();
13823        __struct.secondary_control_sysid = buf.get_u8();
13824        __struct.secondary_control_compid = buf.get_u8();
13825        Ok(__struct)
13826    }
13827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13828        let mut __tmp = BytesMut::new(bytes);
13829        #[allow(clippy::absurd_extreme_comparisons)]
13830        #[allow(unused_comparisons)]
13831        if __tmp.remaining() < Self::ENCODED_LEN {
13832            panic!(
13833                "buffer is too small (need {} bytes, but got {})",
13834                Self::ENCODED_LEN,
13835                __tmp.remaining(),
13836            )
13837        }
13838        __tmp.put_u32_le(self.time_boot_ms);
13839        __tmp.put_u32_le(self.flags.bits());
13840        __tmp.put_u8(self.gimbal_device_id);
13841        __tmp.put_u8(self.primary_control_sysid);
13842        __tmp.put_u8(self.primary_control_compid);
13843        __tmp.put_u8(self.secondary_control_sysid);
13844        __tmp.put_u8(self.secondary_control_compid);
13845        if matches!(version, MavlinkVersion::V2) {
13846            let len = __tmp.len();
13847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13848        } else {
13849            __tmp.len()
13850        }
13851    }
13852}
13853#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13854#[doc = ""]
13855#[doc = "ID: 33"]
13856#[derive(Debug, Clone, PartialEq)]
13857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13859#[cfg_attr(feature = "ts", derive(TS))]
13860#[cfg_attr(feature = "ts", ts(export))]
13861pub struct GLOBAL_POSITION_INT_DATA {
13862    #[doc = "Timestamp (time since system boot)."]
13863    pub time_boot_ms: u32,
13864    #[doc = "Latitude, expressed"]
13865    pub lat: i32,
13866    #[doc = "Longitude, expressed"]
13867    pub lon: i32,
13868    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13869    pub alt: i32,
13870    #[doc = "Altitude above home"]
13871    pub relative_alt: i32,
13872    #[doc = "Ground X Speed (Latitude, positive north)"]
13873    pub vx: i16,
13874    #[doc = "Ground Y Speed (Longitude, positive east)"]
13875    pub vy: i16,
13876    #[doc = "Ground Z Speed (Altitude, positive down)"]
13877    pub vz: i16,
13878    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13879    pub hdg: u16,
13880}
13881impl GLOBAL_POSITION_INT_DATA {
13882    pub const ENCODED_LEN: usize = 28usize;
13883    pub const DEFAULT: Self = Self {
13884        time_boot_ms: 0_u32,
13885        lat: 0_i32,
13886        lon: 0_i32,
13887        alt: 0_i32,
13888        relative_alt: 0_i32,
13889        vx: 0_i16,
13890        vy: 0_i16,
13891        vz: 0_i16,
13892        hdg: 0_u16,
13893    };
13894    #[cfg(feature = "arbitrary")]
13895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13896        use arbitrary::{Arbitrary, Unstructured};
13897        let mut buf = [0u8; 1024];
13898        rng.fill_bytes(&mut buf);
13899        let mut unstructured = Unstructured::new(&buf);
13900        Self::arbitrary(&mut unstructured).unwrap_or_default()
13901    }
13902}
13903impl Default for GLOBAL_POSITION_INT_DATA {
13904    fn default() -> Self {
13905        Self::DEFAULT.clone()
13906    }
13907}
13908impl MessageData for GLOBAL_POSITION_INT_DATA {
13909    type Message = MavMessage;
13910    const ID: u32 = 33u32;
13911    const NAME: &'static str = "GLOBAL_POSITION_INT";
13912    const EXTRA_CRC: u8 = 104u8;
13913    const ENCODED_LEN: usize = 28usize;
13914    fn deser(
13915        _version: MavlinkVersion,
13916        __input: &[u8],
13917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13918        let avail_len = __input.len();
13919        let mut payload_buf = [0; Self::ENCODED_LEN];
13920        let mut buf = if avail_len < Self::ENCODED_LEN {
13921            payload_buf[0..avail_len].copy_from_slice(__input);
13922            Bytes::new(&payload_buf)
13923        } else {
13924            Bytes::new(__input)
13925        };
13926        let mut __struct = Self::default();
13927        __struct.time_boot_ms = buf.get_u32_le();
13928        __struct.lat = buf.get_i32_le();
13929        __struct.lon = buf.get_i32_le();
13930        __struct.alt = buf.get_i32_le();
13931        __struct.relative_alt = buf.get_i32_le();
13932        __struct.vx = buf.get_i16_le();
13933        __struct.vy = buf.get_i16_le();
13934        __struct.vz = buf.get_i16_le();
13935        __struct.hdg = buf.get_u16_le();
13936        Ok(__struct)
13937    }
13938    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13939        let mut __tmp = BytesMut::new(bytes);
13940        #[allow(clippy::absurd_extreme_comparisons)]
13941        #[allow(unused_comparisons)]
13942        if __tmp.remaining() < Self::ENCODED_LEN {
13943            panic!(
13944                "buffer is too small (need {} bytes, but got {})",
13945                Self::ENCODED_LEN,
13946                __tmp.remaining(),
13947            )
13948        }
13949        __tmp.put_u32_le(self.time_boot_ms);
13950        __tmp.put_i32_le(self.lat);
13951        __tmp.put_i32_le(self.lon);
13952        __tmp.put_i32_le(self.alt);
13953        __tmp.put_i32_le(self.relative_alt);
13954        __tmp.put_i16_le(self.vx);
13955        __tmp.put_i16_le(self.vy);
13956        __tmp.put_i16_le(self.vz);
13957        __tmp.put_u16_le(self.hdg);
13958        if matches!(version, MavlinkVersion::V2) {
13959            let len = __tmp.len();
13960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13961        } else {
13962            __tmp.len()
13963        }
13964    }
13965}
13966#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13967#[doc = ""]
13968#[doc = "ID: 63"]
13969#[derive(Debug, Clone, PartialEq)]
13970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13972#[cfg_attr(feature = "ts", derive(TS))]
13973#[cfg_attr(feature = "ts", ts(export))]
13974pub struct GLOBAL_POSITION_INT_COV_DATA {
13975    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13976    pub time_usec: u64,
13977    #[doc = "Latitude"]
13978    pub lat: i32,
13979    #[doc = "Longitude"]
13980    pub lon: i32,
13981    #[doc = "Altitude in meters above MSL"]
13982    pub alt: i32,
13983    #[doc = "Altitude above ground"]
13984    pub relative_alt: i32,
13985    #[doc = "Ground X Speed (Latitude)"]
13986    pub vx: f32,
13987    #[doc = "Ground Y Speed (Longitude)"]
13988    pub vy: f32,
13989    #[doc = "Ground Z Speed (Altitude)"]
13990    pub vz: f32,
13991    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13994    pub covariance: [f32; 36],
13995    #[doc = "Class id of the estimator this estimate originated from."]
13996    pub estimator_type: MavEstimatorType,
13997}
13998impl GLOBAL_POSITION_INT_COV_DATA {
13999    pub const ENCODED_LEN: usize = 181usize;
14000    pub const DEFAULT: Self = Self {
14001        time_usec: 0_u64,
14002        lat: 0_i32,
14003        lon: 0_i32,
14004        alt: 0_i32,
14005        relative_alt: 0_i32,
14006        vx: 0.0_f32,
14007        vy: 0.0_f32,
14008        vz: 0.0_f32,
14009        covariance: [0.0_f32; 36usize],
14010        estimator_type: MavEstimatorType::DEFAULT,
14011    };
14012    #[cfg(feature = "arbitrary")]
14013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14014        use arbitrary::{Arbitrary, Unstructured};
14015        let mut buf = [0u8; 1024];
14016        rng.fill_bytes(&mut buf);
14017        let mut unstructured = Unstructured::new(&buf);
14018        Self::arbitrary(&mut unstructured).unwrap_or_default()
14019    }
14020}
14021impl Default for GLOBAL_POSITION_INT_COV_DATA {
14022    fn default() -> Self {
14023        Self::DEFAULT.clone()
14024    }
14025}
14026impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14027    type Message = MavMessage;
14028    const ID: u32 = 63u32;
14029    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14030    const EXTRA_CRC: u8 = 119u8;
14031    const ENCODED_LEN: usize = 181usize;
14032    fn deser(
14033        _version: MavlinkVersion,
14034        __input: &[u8],
14035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14036        let avail_len = __input.len();
14037        let mut payload_buf = [0; Self::ENCODED_LEN];
14038        let mut buf = if avail_len < Self::ENCODED_LEN {
14039            payload_buf[0..avail_len].copy_from_slice(__input);
14040            Bytes::new(&payload_buf)
14041        } else {
14042            Bytes::new(__input)
14043        };
14044        let mut __struct = Self::default();
14045        __struct.time_usec = buf.get_u64_le();
14046        __struct.lat = buf.get_i32_le();
14047        __struct.lon = buf.get_i32_le();
14048        __struct.alt = buf.get_i32_le();
14049        __struct.relative_alt = buf.get_i32_le();
14050        __struct.vx = buf.get_f32_le();
14051        __struct.vy = buf.get_f32_le();
14052        __struct.vz = buf.get_f32_le();
14053        for v in &mut __struct.covariance {
14054            let val = buf.get_f32_le();
14055            *v = val;
14056        }
14057        let tmp = buf.get_u8();
14058        __struct.estimator_type =
14059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14060                enum_type: "MavEstimatorType",
14061                value: tmp as u64,
14062            })?;
14063        Ok(__struct)
14064    }
14065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14066        let mut __tmp = BytesMut::new(bytes);
14067        #[allow(clippy::absurd_extreme_comparisons)]
14068        #[allow(unused_comparisons)]
14069        if __tmp.remaining() < Self::ENCODED_LEN {
14070            panic!(
14071                "buffer is too small (need {} bytes, but got {})",
14072                Self::ENCODED_LEN,
14073                __tmp.remaining(),
14074            )
14075        }
14076        __tmp.put_u64_le(self.time_usec);
14077        __tmp.put_i32_le(self.lat);
14078        __tmp.put_i32_le(self.lon);
14079        __tmp.put_i32_le(self.alt);
14080        __tmp.put_i32_le(self.relative_alt);
14081        __tmp.put_f32_le(self.vx);
14082        __tmp.put_f32_le(self.vy);
14083        __tmp.put_f32_le(self.vz);
14084        for val in &self.covariance {
14085            __tmp.put_f32_le(*val);
14086        }
14087        __tmp.put_u8(self.estimator_type as u8);
14088        if matches!(version, MavlinkVersion::V2) {
14089            let len = __tmp.len();
14090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14091        } else {
14092            __tmp.len()
14093        }
14094    }
14095}
14096#[doc = "Global position/attitude estimate from a vision source."]
14097#[doc = ""]
14098#[doc = "ID: 101"]
14099#[derive(Debug, Clone, PartialEq)]
14100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14102#[cfg_attr(feature = "ts", derive(TS))]
14103#[cfg_attr(feature = "ts", ts(export))]
14104pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14105    #[doc = "Timestamp (UNIX time or since system boot)"]
14106    pub usec: u64,
14107    #[doc = "Global X position"]
14108    pub x: f32,
14109    #[doc = "Global Y position"]
14110    pub y: f32,
14111    #[doc = "Global Z position"]
14112    pub z: f32,
14113    #[doc = "Roll angle"]
14114    pub roll: f32,
14115    #[doc = "Pitch angle"]
14116    pub pitch: f32,
14117    #[doc = "Yaw angle"]
14118    pub yaw: f32,
14119    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14122    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14123    pub covariance: [f32; 21],
14124    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14126    pub reset_counter: u8,
14127}
14128impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14129    pub const ENCODED_LEN: usize = 117usize;
14130    pub const DEFAULT: Self = Self {
14131        usec: 0_u64,
14132        x: 0.0_f32,
14133        y: 0.0_f32,
14134        z: 0.0_f32,
14135        roll: 0.0_f32,
14136        pitch: 0.0_f32,
14137        yaw: 0.0_f32,
14138        covariance: [0.0_f32; 21usize],
14139        reset_counter: 0_u8,
14140    };
14141    #[cfg(feature = "arbitrary")]
14142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14143        use arbitrary::{Arbitrary, Unstructured};
14144        let mut buf = [0u8; 1024];
14145        rng.fill_bytes(&mut buf);
14146        let mut unstructured = Unstructured::new(&buf);
14147        Self::arbitrary(&mut unstructured).unwrap_or_default()
14148    }
14149}
14150impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14151    fn default() -> Self {
14152        Self::DEFAULT.clone()
14153    }
14154}
14155impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14156    type Message = MavMessage;
14157    const ID: u32 = 101u32;
14158    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14159    const EXTRA_CRC: u8 = 102u8;
14160    const ENCODED_LEN: usize = 117usize;
14161    fn deser(
14162        _version: MavlinkVersion,
14163        __input: &[u8],
14164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14165        let avail_len = __input.len();
14166        let mut payload_buf = [0; Self::ENCODED_LEN];
14167        let mut buf = if avail_len < Self::ENCODED_LEN {
14168            payload_buf[0..avail_len].copy_from_slice(__input);
14169            Bytes::new(&payload_buf)
14170        } else {
14171            Bytes::new(__input)
14172        };
14173        let mut __struct = Self::default();
14174        __struct.usec = buf.get_u64_le();
14175        __struct.x = buf.get_f32_le();
14176        __struct.y = buf.get_f32_le();
14177        __struct.z = buf.get_f32_le();
14178        __struct.roll = buf.get_f32_le();
14179        __struct.pitch = buf.get_f32_le();
14180        __struct.yaw = buf.get_f32_le();
14181        for v in &mut __struct.covariance {
14182            let val = buf.get_f32_le();
14183            *v = val;
14184        }
14185        __struct.reset_counter = buf.get_u8();
14186        Ok(__struct)
14187    }
14188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14189        let mut __tmp = BytesMut::new(bytes);
14190        #[allow(clippy::absurd_extreme_comparisons)]
14191        #[allow(unused_comparisons)]
14192        if __tmp.remaining() < Self::ENCODED_LEN {
14193            panic!(
14194                "buffer is too small (need {} bytes, but got {})",
14195                Self::ENCODED_LEN,
14196                __tmp.remaining(),
14197            )
14198        }
14199        __tmp.put_u64_le(self.usec);
14200        __tmp.put_f32_le(self.x);
14201        __tmp.put_f32_le(self.y);
14202        __tmp.put_f32_le(self.z);
14203        __tmp.put_f32_le(self.roll);
14204        __tmp.put_f32_le(self.pitch);
14205        __tmp.put_f32_le(self.yaw);
14206        if matches!(version, MavlinkVersion::V2) {
14207            for val in &self.covariance {
14208                __tmp.put_f32_le(*val);
14209            }
14210            __tmp.put_u8(self.reset_counter);
14211            let len = __tmp.len();
14212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14213        } else {
14214            __tmp.len()
14215        }
14216    }
14217}
14218#[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
14219#[doc = ""]
14220#[doc = "ID: 441"]
14221#[derive(Debug, Clone, PartialEq)]
14222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14224#[cfg_attr(feature = "ts", derive(TS))]
14225#[cfg_attr(feature = "ts", ts(export))]
14226pub struct GNSS_INTEGRITY_DATA {
14227    #[doc = "Errors in the GPS system."]
14228    pub system_errors: GpsSystemErrorFlags,
14229    #[doc = "Horizontal expected accuracy using satellites successfully validated using RAIM."]
14230    pub raim_hfom: u16,
14231    #[doc = "Vertical expected accuracy using satellites successfully validated using RAIM."]
14232    pub raim_vfom: u16,
14233    #[doc = "GNSS receiver id. Must match instance ids of other messages from same receiver."]
14234    pub id: u8,
14235    #[doc = "Signal authentication state of the GPS system."]
14236    pub authentication_state: GpsAuthenticationState,
14237    #[doc = "Signal jamming state of the GPS system."]
14238    pub jamming_state: GpsJammingState,
14239    #[doc = "Signal spoofing state of the GPS system."]
14240    pub spoofing_state: GpsSpoofingState,
14241    #[doc = "The state of the RAIM processing."]
14242    pub raim_state: GpsRaimState,
14243    #[doc = "An abstract value representing the estimated quality of incoming corrections, or 255 if not available."]
14244    pub corrections_quality: u8,
14245    #[doc = "An abstract value representing the overall status of the receiver, or 255 if not available."]
14246    pub system_status_summary: u8,
14247    #[doc = "An abstract value representing the quality of incoming GNSS signals, or 255 if not available."]
14248    pub gnss_signal_quality: u8,
14249    #[doc = "An abstract value representing the estimated PPK quality, or 255 if not available."]
14250    pub post_processing_quality: u8,
14251}
14252impl GNSS_INTEGRITY_DATA {
14253    pub const ENCODED_LEN: usize = 17usize;
14254    pub const DEFAULT: Self = Self {
14255        system_errors: GpsSystemErrorFlags::DEFAULT,
14256        raim_hfom: 0_u16,
14257        raim_vfom: 0_u16,
14258        id: 0_u8,
14259        authentication_state: GpsAuthenticationState::DEFAULT,
14260        jamming_state: GpsJammingState::DEFAULT,
14261        spoofing_state: GpsSpoofingState::DEFAULT,
14262        raim_state: GpsRaimState::DEFAULT,
14263        corrections_quality: 0_u8,
14264        system_status_summary: 0_u8,
14265        gnss_signal_quality: 0_u8,
14266        post_processing_quality: 0_u8,
14267    };
14268    #[cfg(feature = "arbitrary")]
14269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14270        use arbitrary::{Arbitrary, Unstructured};
14271        let mut buf = [0u8; 1024];
14272        rng.fill_bytes(&mut buf);
14273        let mut unstructured = Unstructured::new(&buf);
14274        Self::arbitrary(&mut unstructured).unwrap_or_default()
14275    }
14276}
14277impl Default for GNSS_INTEGRITY_DATA {
14278    fn default() -> Self {
14279        Self::DEFAULT.clone()
14280    }
14281}
14282impl MessageData for GNSS_INTEGRITY_DATA {
14283    type Message = MavMessage;
14284    const ID: u32 = 441u32;
14285    const NAME: &'static str = "GNSS_INTEGRITY";
14286    const EXTRA_CRC: u8 = 169u8;
14287    const ENCODED_LEN: usize = 17usize;
14288    fn deser(
14289        _version: MavlinkVersion,
14290        __input: &[u8],
14291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14292        let avail_len = __input.len();
14293        let mut payload_buf = [0; Self::ENCODED_LEN];
14294        let mut buf = if avail_len < Self::ENCODED_LEN {
14295            payload_buf[0..avail_len].copy_from_slice(__input);
14296            Bytes::new(&payload_buf)
14297        } else {
14298            Bytes::new(__input)
14299        };
14300        let mut __struct = Self::default();
14301        let tmp = buf.get_u32_le();
14302        __struct.system_errors = GpsSystemErrorFlags::from_bits(tmp).ok_or(
14303            ::mavlink_core::error::ParserError::InvalidFlag {
14304                flag_type: "GpsSystemErrorFlags",
14305                value: tmp as u64,
14306            },
14307        )?;
14308        __struct.raim_hfom = buf.get_u16_le();
14309        __struct.raim_vfom = buf.get_u16_le();
14310        __struct.id = buf.get_u8();
14311        let tmp = buf.get_u8();
14312        __struct.authentication_state =
14313            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14314                enum_type: "GpsAuthenticationState",
14315                value: tmp as u64,
14316            })?;
14317        let tmp = buf.get_u8();
14318        __struct.jamming_state =
14319            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14320                enum_type: "GpsJammingState",
14321                value: tmp as u64,
14322            })?;
14323        let tmp = buf.get_u8();
14324        __struct.spoofing_state =
14325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14326                enum_type: "GpsSpoofingState",
14327                value: tmp as u64,
14328            })?;
14329        let tmp = buf.get_u8();
14330        __struct.raim_state =
14331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14332                enum_type: "GpsRaimState",
14333                value: tmp as u64,
14334            })?;
14335        __struct.corrections_quality = buf.get_u8();
14336        __struct.system_status_summary = buf.get_u8();
14337        __struct.gnss_signal_quality = buf.get_u8();
14338        __struct.post_processing_quality = buf.get_u8();
14339        Ok(__struct)
14340    }
14341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14342        let mut __tmp = BytesMut::new(bytes);
14343        #[allow(clippy::absurd_extreme_comparisons)]
14344        #[allow(unused_comparisons)]
14345        if __tmp.remaining() < Self::ENCODED_LEN {
14346            panic!(
14347                "buffer is too small (need {} bytes, but got {})",
14348                Self::ENCODED_LEN,
14349                __tmp.remaining(),
14350            )
14351        }
14352        __tmp.put_u32_le(self.system_errors.bits());
14353        __tmp.put_u16_le(self.raim_hfom);
14354        __tmp.put_u16_le(self.raim_vfom);
14355        __tmp.put_u8(self.id);
14356        __tmp.put_u8(self.authentication_state as u8);
14357        __tmp.put_u8(self.jamming_state as u8);
14358        __tmp.put_u8(self.spoofing_state as u8);
14359        __tmp.put_u8(self.raim_state as u8);
14360        __tmp.put_u8(self.corrections_quality);
14361        __tmp.put_u8(self.system_status_summary);
14362        __tmp.put_u8(self.gnss_signal_quality);
14363        __tmp.put_u8(self.post_processing_quality);
14364        if matches!(version, MavlinkVersion::V2) {
14365            let len = __tmp.len();
14366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14367        } else {
14368            __tmp.len()
14369        }
14370    }
14371}
14372#[doc = "Second GPS data."]
14373#[doc = ""]
14374#[doc = "ID: 124"]
14375#[derive(Debug, Clone, PartialEq)]
14376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14378#[cfg_attr(feature = "ts", derive(TS))]
14379#[cfg_attr(feature = "ts", ts(export))]
14380pub struct GPS2_RAW_DATA {
14381    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14382    pub time_usec: u64,
14383    #[doc = "Latitude (WGS84)"]
14384    pub lat: i32,
14385    #[doc = "Longitude (WGS84)"]
14386    pub lon: i32,
14387    #[doc = "Altitude (MSL). Positive for up."]
14388    pub alt: i32,
14389    #[doc = "Age of DGPS info"]
14390    pub dgps_age: u32,
14391    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14392    pub eph: u16,
14393    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14394    pub epv: u16,
14395    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14396    pub vel: u16,
14397    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14398    pub cog: u16,
14399    #[doc = "GPS fix type."]
14400    pub fix_type: GpsFixType,
14401    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14402    pub satellites_visible: u8,
14403    #[doc = "Number of DGPS satellites"]
14404    pub dgps_numch: u8,
14405    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14407    pub yaw: u16,
14408    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14409    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14410    pub alt_ellipsoid: i32,
14411    #[doc = "Position uncertainty."]
14412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14413    pub h_acc: u32,
14414    #[doc = "Altitude uncertainty."]
14415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14416    pub v_acc: u32,
14417    #[doc = "Speed uncertainty."]
14418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14419    pub vel_acc: u32,
14420    #[doc = "Heading / track uncertainty"]
14421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14422    pub hdg_acc: u32,
14423}
14424impl GPS2_RAW_DATA {
14425    pub const ENCODED_LEN: usize = 57usize;
14426    pub const DEFAULT: Self = Self {
14427        time_usec: 0_u64,
14428        lat: 0_i32,
14429        lon: 0_i32,
14430        alt: 0_i32,
14431        dgps_age: 0_u32,
14432        eph: 0_u16,
14433        epv: 0_u16,
14434        vel: 0_u16,
14435        cog: 0_u16,
14436        fix_type: GpsFixType::DEFAULT,
14437        satellites_visible: 0_u8,
14438        dgps_numch: 0_u8,
14439        yaw: 0_u16,
14440        alt_ellipsoid: 0_i32,
14441        h_acc: 0_u32,
14442        v_acc: 0_u32,
14443        vel_acc: 0_u32,
14444        hdg_acc: 0_u32,
14445    };
14446    #[cfg(feature = "arbitrary")]
14447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14448        use arbitrary::{Arbitrary, Unstructured};
14449        let mut buf = [0u8; 1024];
14450        rng.fill_bytes(&mut buf);
14451        let mut unstructured = Unstructured::new(&buf);
14452        Self::arbitrary(&mut unstructured).unwrap_or_default()
14453    }
14454}
14455impl Default for GPS2_RAW_DATA {
14456    fn default() -> Self {
14457        Self::DEFAULT.clone()
14458    }
14459}
14460impl MessageData for GPS2_RAW_DATA {
14461    type Message = MavMessage;
14462    const ID: u32 = 124u32;
14463    const NAME: &'static str = "GPS2_RAW";
14464    const EXTRA_CRC: u8 = 87u8;
14465    const ENCODED_LEN: usize = 57usize;
14466    fn deser(
14467        _version: MavlinkVersion,
14468        __input: &[u8],
14469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14470        let avail_len = __input.len();
14471        let mut payload_buf = [0; Self::ENCODED_LEN];
14472        let mut buf = if avail_len < Self::ENCODED_LEN {
14473            payload_buf[0..avail_len].copy_from_slice(__input);
14474            Bytes::new(&payload_buf)
14475        } else {
14476            Bytes::new(__input)
14477        };
14478        let mut __struct = Self::default();
14479        __struct.time_usec = buf.get_u64_le();
14480        __struct.lat = buf.get_i32_le();
14481        __struct.lon = buf.get_i32_le();
14482        __struct.alt = buf.get_i32_le();
14483        __struct.dgps_age = buf.get_u32_le();
14484        __struct.eph = buf.get_u16_le();
14485        __struct.epv = buf.get_u16_le();
14486        __struct.vel = buf.get_u16_le();
14487        __struct.cog = buf.get_u16_le();
14488        let tmp = buf.get_u8();
14489        __struct.fix_type =
14490            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14491                enum_type: "GpsFixType",
14492                value: tmp as u64,
14493            })?;
14494        __struct.satellites_visible = buf.get_u8();
14495        __struct.dgps_numch = buf.get_u8();
14496        __struct.yaw = buf.get_u16_le();
14497        __struct.alt_ellipsoid = buf.get_i32_le();
14498        __struct.h_acc = buf.get_u32_le();
14499        __struct.v_acc = buf.get_u32_le();
14500        __struct.vel_acc = buf.get_u32_le();
14501        __struct.hdg_acc = buf.get_u32_le();
14502        Ok(__struct)
14503    }
14504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14505        let mut __tmp = BytesMut::new(bytes);
14506        #[allow(clippy::absurd_extreme_comparisons)]
14507        #[allow(unused_comparisons)]
14508        if __tmp.remaining() < Self::ENCODED_LEN {
14509            panic!(
14510                "buffer is too small (need {} bytes, but got {})",
14511                Self::ENCODED_LEN,
14512                __tmp.remaining(),
14513            )
14514        }
14515        __tmp.put_u64_le(self.time_usec);
14516        __tmp.put_i32_le(self.lat);
14517        __tmp.put_i32_le(self.lon);
14518        __tmp.put_i32_le(self.alt);
14519        __tmp.put_u32_le(self.dgps_age);
14520        __tmp.put_u16_le(self.eph);
14521        __tmp.put_u16_le(self.epv);
14522        __tmp.put_u16_le(self.vel);
14523        __tmp.put_u16_le(self.cog);
14524        __tmp.put_u8(self.fix_type as u8);
14525        __tmp.put_u8(self.satellites_visible);
14526        __tmp.put_u8(self.dgps_numch);
14527        if matches!(version, MavlinkVersion::V2) {
14528            __tmp.put_u16_le(self.yaw);
14529            __tmp.put_i32_le(self.alt_ellipsoid);
14530            __tmp.put_u32_le(self.h_acc);
14531            __tmp.put_u32_le(self.v_acc);
14532            __tmp.put_u32_le(self.vel_acc);
14533            __tmp.put_u32_le(self.hdg_acc);
14534            let len = __tmp.len();
14535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14536        } else {
14537            __tmp.len()
14538        }
14539    }
14540}
14541#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14542#[doc = ""]
14543#[doc = "ID: 128"]
14544#[derive(Debug, Clone, PartialEq)]
14545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14547#[cfg_attr(feature = "ts", derive(TS))]
14548#[cfg_attr(feature = "ts", ts(export))]
14549pub struct GPS2_RTK_DATA {
14550    #[doc = "Time since boot of last baseline message received."]
14551    pub time_last_baseline_ms: u32,
14552    #[doc = "GPS Time of Week of last baseline"]
14553    pub tow: u32,
14554    #[doc = "Current baseline in ECEF x or NED north component."]
14555    pub baseline_a_mm: i32,
14556    #[doc = "Current baseline in ECEF y or NED east component."]
14557    pub baseline_b_mm: i32,
14558    #[doc = "Current baseline in ECEF z or NED down component."]
14559    pub baseline_c_mm: i32,
14560    #[doc = "Current estimate of baseline accuracy."]
14561    pub accuracy: u32,
14562    #[doc = "Current number of integer ambiguity hypotheses."]
14563    pub iar_num_hypotheses: i32,
14564    #[doc = "GPS Week Number of last baseline"]
14565    pub wn: u16,
14566    #[doc = "Identification of connected RTK receiver."]
14567    pub rtk_receiver_id: u8,
14568    #[doc = "GPS-specific health report for RTK data."]
14569    pub rtk_health: u8,
14570    #[doc = "Rate of baseline messages being received by GPS"]
14571    pub rtk_rate: u8,
14572    #[doc = "Current number of sats used for RTK calculation."]
14573    pub nsats: u8,
14574    #[doc = "Coordinate system of baseline"]
14575    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14576}
14577impl GPS2_RTK_DATA {
14578    pub const ENCODED_LEN: usize = 35usize;
14579    pub const DEFAULT: Self = Self {
14580        time_last_baseline_ms: 0_u32,
14581        tow: 0_u32,
14582        baseline_a_mm: 0_i32,
14583        baseline_b_mm: 0_i32,
14584        baseline_c_mm: 0_i32,
14585        accuracy: 0_u32,
14586        iar_num_hypotheses: 0_i32,
14587        wn: 0_u16,
14588        rtk_receiver_id: 0_u8,
14589        rtk_health: 0_u8,
14590        rtk_rate: 0_u8,
14591        nsats: 0_u8,
14592        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14593    };
14594    #[cfg(feature = "arbitrary")]
14595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14596        use arbitrary::{Arbitrary, Unstructured};
14597        let mut buf = [0u8; 1024];
14598        rng.fill_bytes(&mut buf);
14599        let mut unstructured = Unstructured::new(&buf);
14600        Self::arbitrary(&mut unstructured).unwrap_or_default()
14601    }
14602}
14603impl Default for GPS2_RTK_DATA {
14604    fn default() -> Self {
14605        Self::DEFAULT.clone()
14606    }
14607}
14608impl MessageData for GPS2_RTK_DATA {
14609    type Message = MavMessage;
14610    const ID: u32 = 128u32;
14611    const NAME: &'static str = "GPS2_RTK";
14612    const EXTRA_CRC: u8 = 226u8;
14613    const ENCODED_LEN: usize = 35usize;
14614    fn deser(
14615        _version: MavlinkVersion,
14616        __input: &[u8],
14617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14618        let avail_len = __input.len();
14619        let mut payload_buf = [0; Self::ENCODED_LEN];
14620        let mut buf = if avail_len < Self::ENCODED_LEN {
14621            payload_buf[0..avail_len].copy_from_slice(__input);
14622            Bytes::new(&payload_buf)
14623        } else {
14624            Bytes::new(__input)
14625        };
14626        let mut __struct = Self::default();
14627        __struct.time_last_baseline_ms = buf.get_u32_le();
14628        __struct.tow = buf.get_u32_le();
14629        __struct.baseline_a_mm = buf.get_i32_le();
14630        __struct.baseline_b_mm = buf.get_i32_le();
14631        __struct.baseline_c_mm = buf.get_i32_le();
14632        __struct.accuracy = buf.get_u32_le();
14633        __struct.iar_num_hypotheses = buf.get_i32_le();
14634        __struct.wn = buf.get_u16_le();
14635        __struct.rtk_receiver_id = buf.get_u8();
14636        __struct.rtk_health = buf.get_u8();
14637        __struct.rtk_rate = buf.get_u8();
14638        __struct.nsats = buf.get_u8();
14639        let tmp = buf.get_u8();
14640        __struct.baseline_coords_type =
14641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14642                enum_type: "RtkBaselineCoordinateSystem",
14643                value: tmp as u64,
14644            })?;
14645        Ok(__struct)
14646    }
14647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14648        let mut __tmp = BytesMut::new(bytes);
14649        #[allow(clippy::absurd_extreme_comparisons)]
14650        #[allow(unused_comparisons)]
14651        if __tmp.remaining() < Self::ENCODED_LEN {
14652            panic!(
14653                "buffer is too small (need {} bytes, but got {})",
14654                Self::ENCODED_LEN,
14655                __tmp.remaining(),
14656            )
14657        }
14658        __tmp.put_u32_le(self.time_last_baseline_ms);
14659        __tmp.put_u32_le(self.tow);
14660        __tmp.put_i32_le(self.baseline_a_mm);
14661        __tmp.put_i32_le(self.baseline_b_mm);
14662        __tmp.put_i32_le(self.baseline_c_mm);
14663        __tmp.put_u32_le(self.accuracy);
14664        __tmp.put_i32_le(self.iar_num_hypotheses);
14665        __tmp.put_u16_le(self.wn);
14666        __tmp.put_u8(self.rtk_receiver_id);
14667        __tmp.put_u8(self.rtk_health);
14668        __tmp.put_u8(self.rtk_rate);
14669        __tmp.put_u8(self.nsats);
14670        __tmp.put_u8(self.baseline_coords_type as u8);
14671        if matches!(version, MavlinkVersion::V2) {
14672            let len = __tmp.len();
14673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14674        } else {
14675            __tmp.len()
14676        }
14677    }
14678}
14679#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14680#[doc = ""]
14681#[doc = "ID: 49"]
14682#[derive(Debug, Clone, PartialEq)]
14683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14685#[cfg_attr(feature = "ts", derive(TS))]
14686#[cfg_attr(feature = "ts", ts(export))]
14687pub struct GPS_GLOBAL_ORIGIN_DATA {
14688    #[doc = "Latitude (WGS84)"]
14689    pub latitude: i32,
14690    #[doc = "Longitude (WGS84)"]
14691    pub longitude: i32,
14692    #[doc = "Altitude (MSL). Positive for up."]
14693    pub altitude: i32,
14694    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14696    pub time_usec: u64,
14697}
14698impl GPS_GLOBAL_ORIGIN_DATA {
14699    pub const ENCODED_LEN: usize = 20usize;
14700    pub const DEFAULT: Self = Self {
14701        latitude: 0_i32,
14702        longitude: 0_i32,
14703        altitude: 0_i32,
14704        time_usec: 0_u64,
14705    };
14706    #[cfg(feature = "arbitrary")]
14707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14708        use arbitrary::{Arbitrary, Unstructured};
14709        let mut buf = [0u8; 1024];
14710        rng.fill_bytes(&mut buf);
14711        let mut unstructured = Unstructured::new(&buf);
14712        Self::arbitrary(&mut unstructured).unwrap_or_default()
14713    }
14714}
14715impl Default for GPS_GLOBAL_ORIGIN_DATA {
14716    fn default() -> Self {
14717        Self::DEFAULT.clone()
14718    }
14719}
14720impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14721    type Message = MavMessage;
14722    const ID: u32 = 49u32;
14723    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14724    const EXTRA_CRC: u8 = 39u8;
14725    const ENCODED_LEN: usize = 20usize;
14726    fn deser(
14727        _version: MavlinkVersion,
14728        __input: &[u8],
14729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14730        let avail_len = __input.len();
14731        let mut payload_buf = [0; Self::ENCODED_LEN];
14732        let mut buf = if avail_len < Self::ENCODED_LEN {
14733            payload_buf[0..avail_len].copy_from_slice(__input);
14734            Bytes::new(&payload_buf)
14735        } else {
14736            Bytes::new(__input)
14737        };
14738        let mut __struct = Self::default();
14739        __struct.latitude = buf.get_i32_le();
14740        __struct.longitude = buf.get_i32_le();
14741        __struct.altitude = buf.get_i32_le();
14742        __struct.time_usec = buf.get_u64_le();
14743        Ok(__struct)
14744    }
14745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14746        let mut __tmp = BytesMut::new(bytes);
14747        #[allow(clippy::absurd_extreme_comparisons)]
14748        #[allow(unused_comparisons)]
14749        if __tmp.remaining() < Self::ENCODED_LEN {
14750            panic!(
14751                "buffer is too small (need {} bytes, but got {})",
14752                Self::ENCODED_LEN,
14753                __tmp.remaining(),
14754            )
14755        }
14756        __tmp.put_i32_le(self.latitude);
14757        __tmp.put_i32_le(self.longitude);
14758        __tmp.put_i32_le(self.altitude);
14759        if matches!(version, MavlinkVersion::V2) {
14760            __tmp.put_u64_le(self.time_usec);
14761            let len = __tmp.len();
14762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14763        } else {
14764            __tmp.len()
14765        }
14766    }
14767}
14768#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14769#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14770#[doc = ""]
14771#[doc = "ID: 123"]
14772#[derive(Debug, Clone, PartialEq)]
14773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14775#[cfg_attr(feature = "ts", derive(TS))]
14776#[cfg_attr(feature = "ts", ts(export))]
14777pub struct GPS_INJECT_DATA_DATA {
14778    #[doc = "System ID"]
14779    pub target_system: u8,
14780    #[doc = "Component ID"]
14781    pub target_component: u8,
14782    #[doc = "Data length"]
14783    pub len: u8,
14784    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14786    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14787    pub data: [u8; 110],
14788}
14789impl GPS_INJECT_DATA_DATA {
14790    pub const ENCODED_LEN: usize = 113usize;
14791    pub const DEFAULT: Self = Self {
14792        target_system: 0_u8,
14793        target_component: 0_u8,
14794        len: 0_u8,
14795        data: [0_u8; 110usize],
14796    };
14797    #[cfg(feature = "arbitrary")]
14798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14799        use arbitrary::{Arbitrary, Unstructured};
14800        let mut buf = [0u8; 1024];
14801        rng.fill_bytes(&mut buf);
14802        let mut unstructured = Unstructured::new(&buf);
14803        Self::arbitrary(&mut unstructured).unwrap_or_default()
14804    }
14805}
14806impl Default for GPS_INJECT_DATA_DATA {
14807    fn default() -> Self {
14808        Self::DEFAULT.clone()
14809    }
14810}
14811impl MessageData for GPS_INJECT_DATA_DATA {
14812    type Message = MavMessage;
14813    const ID: u32 = 123u32;
14814    const NAME: &'static str = "GPS_INJECT_DATA";
14815    const EXTRA_CRC: u8 = 250u8;
14816    const ENCODED_LEN: usize = 113usize;
14817    fn deser(
14818        _version: MavlinkVersion,
14819        __input: &[u8],
14820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14821        let avail_len = __input.len();
14822        let mut payload_buf = [0; Self::ENCODED_LEN];
14823        let mut buf = if avail_len < Self::ENCODED_LEN {
14824            payload_buf[0..avail_len].copy_from_slice(__input);
14825            Bytes::new(&payload_buf)
14826        } else {
14827            Bytes::new(__input)
14828        };
14829        let mut __struct = Self::default();
14830        __struct.target_system = buf.get_u8();
14831        __struct.target_component = buf.get_u8();
14832        __struct.len = buf.get_u8();
14833        for v in &mut __struct.data {
14834            let val = buf.get_u8();
14835            *v = val;
14836        }
14837        Ok(__struct)
14838    }
14839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14840        let mut __tmp = BytesMut::new(bytes);
14841        #[allow(clippy::absurd_extreme_comparisons)]
14842        #[allow(unused_comparisons)]
14843        if __tmp.remaining() < Self::ENCODED_LEN {
14844            panic!(
14845                "buffer is too small (need {} bytes, but got {})",
14846                Self::ENCODED_LEN,
14847                __tmp.remaining(),
14848            )
14849        }
14850        __tmp.put_u8(self.target_system);
14851        __tmp.put_u8(self.target_component);
14852        __tmp.put_u8(self.len);
14853        for val in &self.data {
14854            __tmp.put_u8(*val);
14855        }
14856        if matches!(version, MavlinkVersion::V2) {
14857            let len = __tmp.len();
14858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14859        } else {
14860            __tmp.len()
14861        }
14862    }
14863}
14864#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14865#[doc = ""]
14866#[doc = "ID: 232"]
14867#[derive(Debug, Clone, PartialEq)]
14868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14870#[cfg_attr(feature = "ts", derive(TS))]
14871#[cfg_attr(feature = "ts", ts(export))]
14872pub struct GPS_INPUT_DATA {
14873    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14874    pub time_usec: u64,
14875    #[doc = "GPS time (from start of GPS week)"]
14876    pub time_week_ms: u32,
14877    #[doc = "Latitude (WGS84)"]
14878    pub lat: i32,
14879    #[doc = "Longitude (WGS84)"]
14880    pub lon: i32,
14881    #[doc = "Altitude (MSL). Positive for up."]
14882    pub alt: f32,
14883    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14884    pub hdop: f32,
14885    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14886    pub vdop: f32,
14887    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14888    pub vn: f32,
14889    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14890    pub ve: f32,
14891    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14892    pub vd: f32,
14893    #[doc = "GPS speed accuracy"]
14894    pub speed_accuracy: f32,
14895    #[doc = "GPS horizontal accuracy"]
14896    pub horiz_accuracy: f32,
14897    #[doc = "GPS vertical accuracy"]
14898    pub vert_accuracy: f32,
14899    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14900    pub ignore_flags: GpsInputIgnoreFlags,
14901    #[doc = "GPS week number"]
14902    pub time_week: u16,
14903    #[doc = "ID of the GPS for multiple GPS inputs"]
14904    pub gps_id: u8,
14905    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14906    pub fix_type: u8,
14907    #[doc = "Number of satellites visible."]
14908    pub satellites_visible: u8,
14909    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14910    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14911    pub yaw: u16,
14912}
14913impl GPS_INPUT_DATA {
14914    pub const ENCODED_LEN: usize = 65usize;
14915    pub const DEFAULT: Self = Self {
14916        time_usec: 0_u64,
14917        time_week_ms: 0_u32,
14918        lat: 0_i32,
14919        lon: 0_i32,
14920        alt: 0.0_f32,
14921        hdop: 0.0_f32,
14922        vdop: 0.0_f32,
14923        vn: 0.0_f32,
14924        ve: 0.0_f32,
14925        vd: 0.0_f32,
14926        speed_accuracy: 0.0_f32,
14927        horiz_accuracy: 0.0_f32,
14928        vert_accuracy: 0.0_f32,
14929        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14930        time_week: 0_u16,
14931        gps_id: 0_u8,
14932        fix_type: 0_u8,
14933        satellites_visible: 0_u8,
14934        yaw: 0_u16,
14935    };
14936    #[cfg(feature = "arbitrary")]
14937    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14938        use arbitrary::{Arbitrary, Unstructured};
14939        let mut buf = [0u8; 1024];
14940        rng.fill_bytes(&mut buf);
14941        let mut unstructured = Unstructured::new(&buf);
14942        Self::arbitrary(&mut unstructured).unwrap_or_default()
14943    }
14944}
14945impl Default for GPS_INPUT_DATA {
14946    fn default() -> Self {
14947        Self::DEFAULT.clone()
14948    }
14949}
14950impl MessageData for GPS_INPUT_DATA {
14951    type Message = MavMessage;
14952    const ID: u32 = 232u32;
14953    const NAME: &'static str = "GPS_INPUT";
14954    const EXTRA_CRC: u8 = 151u8;
14955    const ENCODED_LEN: usize = 65usize;
14956    fn deser(
14957        _version: MavlinkVersion,
14958        __input: &[u8],
14959    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14960        let avail_len = __input.len();
14961        let mut payload_buf = [0; Self::ENCODED_LEN];
14962        let mut buf = if avail_len < Self::ENCODED_LEN {
14963            payload_buf[0..avail_len].copy_from_slice(__input);
14964            Bytes::new(&payload_buf)
14965        } else {
14966            Bytes::new(__input)
14967        };
14968        let mut __struct = Self::default();
14969        __struct.time_usec = buf.get_u64_le();
14970        __struct.time_week_ms = buf.get_u32_le();
14971        __struct.lat = buf.get_i32_le();
14972        __struct.lon = buf.get_i32_le();
14973        __struct.alt = buf.get_f32_le();
14974        __struct.hdop = buf.get_f32_le();
14975        __struct.vdop = buf.get_f32_le();
14976        __struct.vn = buf.get_f32_le();
14977        __struct.ve = buf.get_f32_le();
14978        __struct.vd = buf.get_f32_le();
14979        __struct.speed_accuracy = buf.get_f32_le();
14980        __struct.horiz_accuracy = buf.get_f32_le();
14981        __struct.vert_accuracy = buf.get_f32_le();
14982        let tmp = buf.get_u16_le();
14983        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(tmp).ok_or(
14984            ::mavlink_core::error::ParserError::InvalidFlag {
14985                flag_type: "GpsInputIgnoreFlags",
14986                value: tmp as u64,
14987            },
14988        )?;
14989        __struct.time_week = buf.get_u16_le();
14990        __struct.gps_id = buf.get_u8();
14991        __struct.fix_type = buf.get_u8();
14992        __struct.satellites_visible = buf.get_u8();
14993        __struct.yaw = buf.get_u16_le();
14994        Ok(__struct)
14995    }
14996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14997        let mut __tmp = BytesMut::new(bytes);
14998        #[allow(clippy::absurd_extreme_comparisons)]
14999        #[allow(unused_comparisons)]
15000        if __tmp.remaining() < Self::ENCODED_LEN {
15001            panic!(
15002                "buffer is too small (need {} bytes, but got {})",
15003                Self::ENCODED_LEN,
15004                __tmp.remaining(),
15005            )
15006        }
15007        __tmp.put_u64_le(self.time_usec);
15008        __tmp.put_u32_le(self.time_week_ms);
15009        __tmp.put_i32_le(self.lat);
15010        __tmp.put_i32_le(self.lon);
15011        __tmp.put_f32_le(self.alt);
15012        __tmp.put_f32_le(self.hdop);
15013        __tmp.put_f32_le(self.vdop);
15014        __tmp.put_f32_le(self.vn);
15015        __tmp.put_f32_le(self.ve);
15016        __tmp.put_f32_le(self.vd);
15017        __tmp.put_f32_le(self.speed_accuracy);
15018        __tmp.put_f32_le(self.horiz_accuracy);
15019        __tmp.put_f32_le(self.vert_accuracy);
15020        __tmp.put_u16_le(self.ignore_flags.bits());
15021        __tmp.put_u16_le(self.time_week);
15022        __tmp.put_u8(self.gps_id);
15023        __tmp.put_u8(self.fix_type);
15024        __tmp.put_u8(self.satellites_visible);
15025        if matches!(version, MavlinkVersion::V2) {
15026            __tmp.put_u16_le(self.yaw);
15027            let len = __tmp.len();
15028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15029        } else {
15030            __tmp.len()
15031        }
15032    }
15033}
15034#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15035#[doc = ""]
15036#[doc = "ID: 24"]
15037#[derive(Debug, Clone, PartialEq)]
15038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15040#[cfg_attr(feature = "ts", derive(TS))]
15041#[cfg_attr(feature = "ts", ts(export))]
15042pub struct GPS_RAW_INT_DATA {
15043    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15044    pub time_usec: u64,
15045    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15046    pub lat: i32,
15047    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15048    pub lon: i32,
15049    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15050    pub alt: i32,
15051    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15052    pub eph: u16,
15053    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15054    pub epv: u16,
15055    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15056    pub vel: u16,
15057    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15058    pub cog: u16,
15059    #[doc = "GPS fix type."]
15060    pub fix_type: GpsFixType,
15061    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15062    pub satellites_visible: u8,
15063    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15064    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15065    pub alt_ellipsoid: i32,
15066    #[doc = "Position uncertainty."]
15067    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15068    pub h_acc: u32,
15069    #[doc = "Altitude uncertainty."]
15070    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15071    pub v_acc: u32,
15072    #[doc = "Speed uncertainty."]
15073    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15074    pub vel_acc: u32,
15075    #[doc = "Heading / track uncertainty"]
15076    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15077    pub hdg_acc: u32,
15078    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15080    pub yaw: u16,
15081}
15082impl GPS_RAW_INT_DATA {
15083    pub const ENCODED_LEN: usize = 52usize;
15084    pub const DEFAULT: Self = Self {
15085        time_usec: 0_u64,
15086        lat: 0_i32,
15087        lon: 0_i32,
15088        alt: 0_i32,
15089        eph: 0_u16,
15090        epv: 0_u16,
15091        vel: 0_u16,
15092        cog: 0_u16,
15093        fix_type: GpsFixType::DEFAULT,
15094        satellites_visible: 0_u8,
15095        alt_ellipsoid: 0_i32,
15096        h_acc: 0_u32,
15097        v_acc: 0_u32,
15098        vel_acc: 0_u32,
15099        hdg_acc: 0_u32,
15100        yaw: 0_u16,
15101    };
15102    #[cfg(feature = "arbitrary")]
15103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15104        use arbitrary::{Arbitrary, Unstructured};
15105        let mut buf = [0u8; 1024];
15106        rng.fill_bytes(&mut buf);
15107        let mut unstructured = Unstructured::new(&buf);
15108        Self::arbitrary(&mut unstructured).unwrap_or_default()
15109    }
15110}
15111impl Default for GPS_RAW_INT_DATA {
15112    fn default() -> Self {
15113        Self::DEFAULT.clone()
15114    }
15115}
15116impl MessageData for GPS_RAW_INT_DATA {
15117    type Message = MavMessage;
15118    const ID: u32 = 24u32;
15119    const NAME: &'static str = "GPS_RAW_INT";
15120    const EXTRA_CRC: u8 = 24u8;
15121    const ENCODED_LEN: usize = 52usize;
15122    fn deser(
15123        _version: MavlinkVersion,
15124        __input: &[u8],
15125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15126        let avail_len = __input.len();
15127        let mut payload_buf = [0; Self::ENCODED_LEN];
15128        let mut buf = if avail_len < Self::ENCODED_LEN {
15129            payload_buf[0..avail_len].copy_from_slice(__input);
15130            Bytes::new(&payload_buf)
15131        } else {
15132            Bytes::new(__input)
15133        };
15134        let mut __struct = Self::default();
15135        __struct.time_usec = buf.get_u64_le();
15136        __struct.lat = buf.get_i32_le();
15137        __struct.lon = buf.get_i32_le();
15138        __struct.alt = buf.get_i32_le();
15139        __struct.eph = buf.get_u16_le();
15140        __struct.epv = buf.get_u16_le();
15141        __struct.vel = buf.get_u16_le();
15142        __struct.cog = buf.get_u16_le();
15143        let tmp = buf.get_u8();
15144        __struct.fix_type =
15145            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15146                enum_type: "GpsFixType",
15147                value: tmp as u64,
15148            })?;
15149        __struct.satellites_visible = buf.get_u8();
15150        __struct.alt_ellipsoid = buf.get_i32_le();
15151        __struct.h_acc = buf.get_u32_le();
15152        __struct.v_acc = buf.get_u32_le();
15153        __struct.vel_acc = buf.get_u32_le();
15154        __struct.hdg_acc = buf.get_u32_le();
15155        __struct.yaw = buf.get_u16_le();
15156        Ok(__struct)
15157    }
15158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15159        let mut __tmp = BytesMut::new(bytes);
15160        #[allow(clippy::absurd_extreme_comparisons)]
15161        #[allow(unused_comparisons)]
15162        if __tmp.remaining() < Self::ENCODED_LEN {
15163            panic!(
15164                "buffer is too small (need {} bytes, but got {})",
15165                Self::ENCODED_LEN,
15166                __tmp.remaining(),
15167            )
15168        }
15169        __tmp.put_u64_le(self.time_usec);
15170        __tmp.put_i32_le(self.lat);
15171        __tmp.put_i32_le(self.lon);
15172        __tmp.put_i32_le(self.alt);
15173        __tmp.put_u16_le(self.eph);
15174        __tmp.put_u16_le(self.epv);
15175        __tmp.put_u16_le(self.vel);
15176        __tmp.put_u16_le(self.cog);
15177        __tmp.put_u8(self.fix_type as u8);
15178        __tmp.put_u8(self.satellites_visible);
15179        if matches!(version, MavlinkVersion::V2) {
15180            __tmp.put_i32_le(self.alt_ellipsoid);
15181            __tmp.put_u32_le(self.h_acc);
15182            __tmp.put_u32_le(self.v_acc);
15183            __tmp.put_u32_le(self.vel_acc);
15184            __tmp.put_u32_le(self.hdg_acc);
15185            __tmp.put_u16_le(self.yaw);
15186            let len = __tmp.len();
15187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15188        } else {
15189            __tmp.len()
15190        }
15191    }
15192}
15193#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15194#[doc = ""]
15195#[doc = "ID: 233"]
15196#[derive(Debug, Clone, PartialEq)]
15197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15199#[cfg_attr(feature = "ts", derive(TS))]
15200#[cfg_attr(feature = "ts", ts(export))]
15201pub struct GPS_RTCM_DATA_DATA {
15202    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15203    pub flags: u8,
15204    #[doc = "data length"]
15205    pub len: u8,
15206    #[doc = "RTCM message (may be fragmented)"]
15207    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15208    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15209    pub data: [u8; 180],
15210}
15211impl GPS_RTCM_DATA_DATA {
15212    pub const ENCODED_LEN: usize = 182usize;
15213    pub const DEFAULT: Self = Self {
15214        flags: 0_u8,
15215        len: 0_u8,
15216        data: [0_u8; 180usize],
15217    };
15218    #[cfg(feature = "arbitrary")]
15219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15220        use arbitrary::{Arbitrary, Unstructured};
15221        let mut buf = [0u8; 1024];
15222        rng.fill_bytes(&mut buf);
15223        let mut unstructured = Unstructured::new(&buf);
15224        Self::arbitrary(&mut unstructured).unwrap_or_default()
15225    }
15226}
15227impl Default for GPS_RTCM_DATA_DATA {
15228    fn default() -> Self {
15229        Self::DEFAULT.clone()
15230    }
15231}
15232impl MessageData for GPS_RTCM_DATA_DATA {
15233    type Message = MavMessage;
15234    const ID: u32 = 233u32;
15235    const NAME: &'static str = "GPS_RTCM_DATA";
15236    const EXTRA_CRC: u8 = 35u8;
15237    const ENCODED_LEN: usize = 182usize;
15238    fn deser(
15239        _version: MavlinkVersion,
15240        __input: &[u8],
15241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15242        let avail_len = __input.len();
15243        let mut payload_buf = [0; Self::ENCODED_LEN];
15244        let mut buf = if avail_len < Self::ENCODED_LEN {
15245            payload_buf[0..avail_len].copy_from_slice(__input);
15246            Bytes::new(&payload_buf)
15247        } else {
15248            Bytes::new(__input)
15249        };
15250        let mut __struct = Self::default();
15251        __struct.flags = buf.get_u8();
15252        __struct.len = buf.get_u8();
15253        for v in &mut __struct.data {
15254            let val = buf.get_u8();
15255            *v = val;
15256        }
15257        Ok(__struct)
15258    }
15259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15260        let mut __tmp = BytesMut::new(bytes);
15261        #[allow(clippy::absurd_extreme_comparisons)]
15262        #[allow(unused_comparisons)]
15263        if __tmp.remaining() < Self::ENCODED_LEN {
15264            panic!(
15265                "buffer is too small (need {} bytes, but got {})",
15266                Self::ENCODED_LEN,
15267                __tmp.remaining(),
15268            )
15269        }
15270        __tmp.put_u8(self.flags);
15271        __tmp.put_u8(self.len);
15272        for val in &self.data {
15273            __tmp.put_u8(*val);
15274        }
15275        if matches!(version, MavlinkVersion::V2) {
15276            let len = __tmp.len();
15277            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15278        } else {
15279            __tmp.len()
15280        }
15281    }
15282}
15283#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15284#[doc = ""]
15285#[doc = "ID: 127"]
15286#[derive(Debug, Clone, PartialEq)]
15287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15289#[cfg_attr(feature = "ts", derive(TS))]
15290#[cfg_attr(feature = "ts", ts(export))]
15291pub struct GPS_RTK_DATA {
15292    #[doc = "Time since boot of last baseline message received."]
15293    pub time_last_baseline_ms: u32,
15294    #[doc = "GPS Time of Week of last baseline"]
15295    pub tow: u32,
15296    #[doc = "Current baseline in ECEF x or NED north component."]
15297    pub baseline_a_mm: i32,
15298    #[doc = "Current baseline in ECEF y or NED east component."]
15299    pub baseline_b_mm: i32,
15300    #[doc = "Current baseline in ECEF z or NED down component."]
15301    pub baseline_c_mm: i32,
15302    #[doc = "Current estimate of baseline accuracy."]
15303    pub accuracy: u32,
15304    #[doc = "Current number of integer ambiguity hypotheses."]
15305    pub iar_num_hypotheses: i32,
15306    #[doc = "GPS Week Number of last baseline"]
15307    pub wn: u16,
15308    #[doc = "Identification of connected RTK receiver."]
15309    pub rtk_receiver_id: u8,
15310    #[doc = "GPS-specific health report for RTK data."]
15311    pub rtk_health: u8,
15312    #[doc = "Rate of baseline messages being received by GPS"]
15313    pub rtk_rate: u8,
15314    #[doc = "Current number of sats used for RTK calculation."]
15315    pub nsats: u8,
15316    #[doc = "Coordinate system of baseline"]
15317    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15318}
15319impl GPS_RTK_DATA {
15320    pub const ENCODED_LEN: usize = 35usize;
15321    pub const DEFAULT: Self = Self {
15322        time_last_baseline_ms: 0_u32,
15323        tow: 0_u32,
15324        baseline_a_mm: 0_i32,
15325        baseline_b_mm: 0_i32,
15326        baseline_c_mm: 0_i32,
15327        accuracy: 0_u32,
15328        iar_num_hypotheses: 0_i32,
15329        wn: 0_u16,
15330        rtk_receiver_id: 0_u8,
15331        rtk_health: 0_u8,
15332        rtk_rate: 0_u8,
15333        nsats: 0_u8,
15334        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15335    };
15336    #[cfg(feature = "arbitrary")]
15337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15338        use arbitrary::{Arbitrary, Unstructured};
15339        let mut buf = [0u8; 1024];
15340        rng.fill_bytes(&mut buf);
15341        let mut unstructured = Unstructured::new(&buf);
15342        Self::arbitrary(&mut unstructured).unwrap_or_default()
15343    }
15344}
15345impl Default for GPS_RTK_DATA {
15346    fn default() -> Self {
15347        Self::DEFAULT.clone()
15348    }
15349}
15350impl MessageData for GPS_RTK_DATA {
15351    type Message = MavMessage;
15352    const ID: u32 = 127u32;
15353    const NAME: &'static str = "GPS_RTK";
15354    const EXTRA_CRC: u8 = 25u8;
15355    const ENCODED_LEN: usize = 35usize;
15356    fn deser(
15357        _version: MavlinkVersion,
15358        __input: &[u8],
15359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15360        let avail_len = __input.len();
15361        let mut payload_buf = [0; Self::ENCODED_LEN];
15362        let mut buf = if avail_len < Self::ENCODED_LEN {
15363            payload_buf[0..avail_len].copy_from_slice(__input);
15364            Bytes::new(&payload_buf)
15365        } else {
15366            Bytes::new(__input)
15367        };
15368        let mut __struct = Self::default();
15369        __struct.time_last_baseline_ms = buf.get_u32_le();
15370        __struct.tow = buf.get_u32_le();
15371        __struct.baseline_a_mm = buf.get_i32_le();
15372        __struct.baseline_b_mm = buf.get_i32_le();
15373        __struct.baseline_c_mm = buf.get_i32_le();
15374        __struct.accuracy = buf.get_u32_le();
15375        __struct.iar_num_hypotheses = buf.get_i32_le();
15376        __struct.wn = buf.get_u16_le();
15377        __struct.rtk_receiver_id = buf.get_u8();
15378        __struct.rtk_health = buf.get_u8();
15379        __struct.rtk_rate = buf.get_u8();
15380        __struct.nsats = buf.get_u8();
15381        let tmp = buf.get_u8();
15382        __struct.baseline_coords_type =
15383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15384                enum_type: "RtkBaselineCoordinateSystem",
15385                value: tmp as u64,
15386            })?;
15387        Ok(__struct)
15388    }
15389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15390        let mut __tmp = BytesMut::new(bytes);
15391        #[allow(clippy::absurd_extreme_comparisons)]
15392        #[allow(unused_comparisons)]
15393        if __tmp.remaining() < Self::ENCODED_LEN {
15394            panic!(
15395                "buffer is too small (need {} bytes, but got {})",
15396                Self::ENCODED_LEN,
15397                __tmp.remaining(),
15398            )
15399        }
15400        __tmp.put_u32_le(self.time_last_baseline_ms);
15401        __tmp.put_u32_le(self.tow);
15402        __tmp.put_i32_le(self.baseline_a_mm);
15403        __tmp.put_i32_le(self.baseline_b_mm);
15404        __tmp.put_i32_le(self.baseline_c_mm);
15405        __tmp.put_u32_le(self.accuracy);
15406        __tmp.put_i32_le(self.iar_num_hypotheses);
15407        __tmp.put_u16_le(self.wn);
15408        __tmp.put_u8(self.rtk_receiver_id);
15409        __tmp.put_u8(self.rtk_health);
15410        __tmp.put_u8(self.rtk_rate);
15411        __tmp.put_u8(self.nsats);
15412        __tmp.put_u8(self.baseline_coords_type as u8);
15413        if matches!(version, MavlinkVersion::V2) {
15414            let len = __tmp.len();
15415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15416        } else {
15417            __tmp.len()
15418        }
15419    }
15420}
15421#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15422#[doc = ""]
15423#[doc = "ID: 25"]
15424#[derive(Debug, Clone, PartialEq)]
15425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15427#[cfg_attr(feature = "ts", derive(TS))]
15428#[cfg_attr(feature = "ts", ts(export))]
15429pub struct GPS_STATUS_DATA {
15430    #[doc = "Number of satellites visible"]
15431    pub satellites_visible: u8,
15432    #[doc = "Global satellite ID"]
15433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15435    pub satellite_prn: [u8; 20],
15436    #[doc = "0: Satellite not used, 1: used for localization"]
15437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15439    pub satellite_used: [u8; 20],
15440    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15442    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15443    pub satellite_elevation: [u8; 20],
15444    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15446    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15447    pub satellite_azimuth: [u8; 20],
15448    #[doc = "Signal to noise ratio of satellite"]
15449    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15450    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15451    pub satellite_snr: [u8; 20],
15452}
15453impl GPS_STATUS_DATA {
15454    pub const ENCODED_LEN: usize = 101usize;
15455    pub const DEFAULT: Self = Self {
15456        satellites_visible: 0_u8,
15457        satellite_prn: [0_u8; 20usize],
15458        satellite_used: [0_u8; 20usize],
15459        satellite_elevation: [0_u8; 20usize],
15460        satellite_azimuth: [0_u8; 20usize],
15461        satellite_snr: [0_u8; 20usize],
15462    };
15463    #[cfg(feature = "arbitrary")]
15464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15465        use arbitrary::{Arbitrary, Unstructured};
15466        let mut buf = [0u8; 1024];
15467        rng.fill_bytes(&mut buf);
15468        let mut unstructured = Unstructured::new(&buf);
15469        Self::arbitrary(&mut unstructured).unwrap_or_default()
15470    }
15471}
15472impl Default for GPS_STATUS_DATA {
15473    fn default() -> Self {
15474        Self::DEFAULT.clone()
15475    }
15476}
15477impl MessageData for GPS_STATUS_DATA {
15478    type Message = MavMessage;
15479    const ID: u32 = 25u32;
15480    const NAME: &'static str = "GPS_STATUS";
15481    const EXTRA_CRC: u8 = 23u8;
15482    const ENCODED_LEN: usize = 101usize;
15483    fn deser(
15484        _version: MavlinkVersion,
15485        __input: &[u8],
15486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15487        let avail_len = __input.len();
15488        let mut payload_buf = [0; Self::ENCODED_LEN];
15489        let mut buf = if avail_len < Self::ENCODED_LEN {
15490            payload_buf[0..avail_len].copy_from_slice(__input);
15491            Bytes::new(&payload_buf)
15492        } else {
15493            Bytes::new(__input)
15494        };
15495        let mut __struct = Self::default();
15496        __struct.satellites_visible = buf.get_u8();
15497        for v in &mut __struct.satellite_prn {
15498            let val = buf.get_u8();
15499            *v = val;
15500        }
15501        for v in &mut __struct.satellite_used {
15502            let val = buf.get_u8();
15503            *v = val;
15504        }
15505        for v in &mut __struct.satellite_elevation {
15506            let val = buf.get_u8();
15507            *v = val;
15508        }
15509        for v in &mut __struct.satellite_azimuth {
15510            let val = buf.get_u8();
15511            *v = val;
15512        }
15513        for v in &mut __struct.satellite_snr {
15514            let val = buf.get_u8();
15515            *v = val;
15516        }
15517        Ok(__struct)
15518    }
15519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15520        let mut __tmp = BytesMut::new(bytes);
15521        #[allow(clippy::absurd_extreme_comparisons)]
15522        #[allow(unused_comparisons)]
15523        if __tmp.remaining() < Self::ENCODED_LEN {
15524            panic!(
15525                "buffer is too small (need {} bytes, but got {})",
15526                Self::ENCODED_LEN,
15527                __tmp.remaining(),
15528            )
15529        }
15530        __tmp.put_u8(self.satellites_visible);
15531        for val in &self.satellite_prn {
15532            __tmp.put_u8(*val);
15533        }
15534        for val in &self.satellite_used {
15535            __tmp.put_u8(*val);
15536        }
15537        for val in &self.satellite_elevation {
15538            __tmp.put_u8(*val);
15539        }
15540        for val in &self.satellite_azimuth {
15541            __tmp.put_u8(*val);
15542        }
15543        for val in &self.satellite_snr {
15544            __tmp.put_u8(*val);
15545        }
15546        if matches!(version, MavlinkVersion::V2) {
15547            let len = __tmp.len();
15548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15549        } else {
15550            __tmp.len()
15551        }
15552    }
15553}
15554#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
15555#[doc = ""]
15556#[doc = "ID: 415"]
15557#[derive(Debug, Clone, PartialEq)]
15558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15560#[cfg_attr(feature = "ts", derive(TS))]
15561#[cfg_attr(feature = "ts", ts(export))]
15562pub struct GROUP_END_DATA {
15563    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15564    pub time_usec: u64,
15565    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_END)."]
15566    pub group_id: u32,
15567    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15568    pub mission_checksum: u32,
15569}
15570impl GROUP_END_DATA {
15571    pub const ENCODED_LEN: usize = 16usize;
15572    pub const DEFAULT: Self = Self {
15573        time_usec: 0_u64,
15574        group_id: 0_u32,
15575        mission_checksum: 0_u32,
15576    };
15577    #[cfg(feature = "arbitrary")]
15578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15579        use arbitrary::{Arbitrary, Unstructured};
15580        let mut buf = [0u8; 1024];
15581        rng.fill_bytes(&mut buf);
15582        let mut unstructured = Unstructured::new(&buf);
15583        Self::arbitrary(&mut unstructured).unwrap_or_default()
15584    }
15585}
15586impl Default for GROUP_END_DATA {
15587    fn default() -> Self {
15588        Self::DEFAULT.clone()
15589    }
15590}
15591impl MessageData for GROUP_END_DATA {
15592    type Message = MavMessage;
15593    const ID: u32 = 415u32;
15594    const NAME: &'static str = "GROUP_END";
15595    const EXTRA_CRC: u8 = 161u8;
15596    const ENCODED_LEN: usize = 16usize;
15597    fn deser(
15598        _version: MavlinkVersion,
15599        __input: &[u8],
15600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15601        let avail_len = __input.len();
15602        let mut payload_buf = [0; Self::ENCODED_LEN];
15603        let mut buf = if avail_len < Self::ENCODED_LEN {
15604            payload_buf[0..avail_len].copy_from_slice(__input);
15605            Bytes::new(&payload_buf)
15606        } else {
15607            Bytes::new(__input)
15608        };
15609        let mut __struct = Self::default();
15610        __struct.time_usec = buf.get_u64_le();
15611        __struct.group_id = buf.get_u32_le();
15612        __struct.mission_checksum = buf.get_u32_le();
15613        Ok(__struct)
15614    }
15615    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15616        let mut __tmp = BytesMut::new(bytes);
15617        #[allow(clippy::absurd_extreme_comparisons)]
15618        #[allow(unused_comparisons)]
15619        if __tmp.remaining() < Self::ENCODED_LEN {
15620            panic!(
15621                "buffer is too small (need {} bytes, but got {})",
15622                Self::ENCODED_LEN,
15623                __tmp.remaining(),
15624            )
15625        }
15626        __tmp.put_u64_le(self.time_usec);
15627        __tmp.put_u32_le(self.group_id);
15628        __tmp.put_u32_le(self.mission_checksum);
15629        if matches!(version, MavlinkVersion::V2) {
15630            let len = __tmp.len();
15631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15632        } else {
15633            __tmp.len()
15634        }
15635    }
15636}
15637#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
15638#[doc = ""]
15639#[doc = "ID: 414"]
15640#[derive(Debug, Clone, PartialEq)]
15641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15643#[cfg_attr(feature = "ts", derive(TS))]
15644#[cfg_attr(feature = "ts", ts(export))]
15645pub struct GROUP_START_DATA {
15646    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15647    pub time_usec: u64,
15648    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_START)."]
15649    pub group_id: u32,
15650    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15651    pub mission_checksum: u32,
15652}
15653impl GROUP_START_DATA {
15654    pub const ENCODED_LEN: usize = 16usize;
15655    pub const DEFAULT: Self = Self {
15656        time_usec: 0_u64,
15657        group_id: 0_u32,
15658        mission_checksum: 0_u32,
15659    };
15660    #[cfg(feature = "arbitrary")]
15661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15662        use arbitrary::{Arbitrary, Unstructured};
15663        let mut buf = [0u8; 1024];
15664        rng.fill_bytes(&mut buf);
15665        let mut unstructured = Unstructured::new(&buf);
15666        Self::arbitrary(&mut unstructured).unwrap_or_default()
15667    }
15668}
15669impl Default for GROUP_START_DATA {
15670    fn default() -> Self {
15671        Self::DEFAULT.clone()
15672    }
15673}
15674impl MessageData for GROUP_START_DATA {
15675    type Message = MavMessage;
15676    const ID: u32 = 414u32;
15677    const NAME: &'static str = "GROUP_START";
15678    const EXTRA_CRC: u8 = 109u8;
15679    const ENCODED_LEN: usize = 16usize;
15680    fn deser(
15681        _version: MavlinkVersion,
15682        __input: &[u8],
15683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15684        let avail_len = __input.len();
15685        let mut payload_buf = [0; Self::ENCODED_LEN];
15686        let mut buf = if avail_len < Self::ENCODED_LEN {
15687            payload_buf[0..avail_len].copy_from_slice(__input);
15688            Bytes::new(&payload_buf)
15689        } else {
15690            Bytes::new(__input)
15691        };
15692        let mut __struct = Self::default();
15693        __struct.time_usec = buf.get_u64_le();
15694        __struct.group_id = buf.get_u32_le();
15695        __struct.mission_checksum = buf.get_u32_le();
15696        Ok(__struct)
15697    }
15698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15699        let mut __tmp = BytesMut::new(bytes);
15700        #[allow(clippy::absurd_extreme_comparisons)]
15701        #[allow(unused_comparisons)]
15702        if __tmp.remaining() < Self::ENCODED_LEN {
15703            panic!(
15704                "buffer is too small (need {} bytes, but got {})",
15705                Self::ENCODED_LEN,
15706                __tmp.remaining(),
15707            )
15708        }
15709        __tmp.put_u64_le(self.time_usec);
15710        __tmp.put_u32_le(self.group_id);
15711        __tmp.put_u32_le(self.mission_checksum);
15712        if matches!(version, MavlinkVersion::V2) {
15713            let len = __tmp.len();
15714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15715        } else {
15716            __tmp.len()
15717        }
15718    }
15719}
15720#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15721#[doc = ""]
15722#[doc = "ID: 0"]
15723#[derive(Debug, Clone, PartialEq)]
15724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15726#[cfg_attr(feature = "ts", derive(TS))]
15727#[cfg_attr(feature = "ts", ts(export))]
15728pub struct HEARTBEAT_DATA {
15729    #[doc = "A bitfield for use for autopilot-specific flags"]
15730    pub custom_mode: u32,
15731    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15732    pub mavtype: MavType,
15733    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15734    pub autopilot: MavAutopilot,
15735    #[doc = "System mode bitmap."]
15736    pub base_mode: MavModeFlag,
15737    #[doc = "System status flag."]
15738    pub system_status: MavState,
15739    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15740    pub mavlink_version: u8,
15741}
15742impl HEARTBEAT_DATA {
15743    pub const ENCODED_LEN: usize = 9usize;
15744    pub const DEFAULT: Self = Self {
15745        custom_mode: 0_u32,
15746        mavtype: MavType::DEFAULT,
15747        autopilot: MavAutopilot::DEFAULT,
15748        base_mode: MavModeFlag::DEFAULT,
15749        system_status: MavState::DEFAULT,
15750        mavlink_version: MINOR_MAVLINK_VERSION,
15751    };
15752    #[cfg(feature = "arbitrary")]
15753    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15754        use arbitrary::{Arbitrary, Unstructured};
15755        let mut buf = [0u8; 1024];
15756        rng.fill_bytes(&mut buf);
15757        let mut unstructured = Unstructured::new(&buf);
15758        Self::arbitrary(&mut unstructured).unwrap_or_default()
15759    }
15760}
15761impl Default for HEARTBEAT_DATA {
15762    fn default() -> Self {
15763        Self::DEFAULT.clone()
15764    }
15765}
15766impl MessageData for HEARTBEAT_DATA {
15767    type Message = MavMessage;
15768    const ID: u32 = 0u32;
15769    const NAME: &'static str = "HEARTBEAT";
15770    const EXTRA_CRC: u8 = 50u8;
15771    const ENCODED_LEN: usize = 9usize;
15772    fn deser(
15773        _version: MavlinkVersion,
15774        __input: &[u8],
15775    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15776        let avail_len = __input.len();
15777        let mut payload_buf = [0; Self::ENCODED_LEN];
15778        let mut buf = if avail_len < Self::ENCODED_LEN {
15779            payload_buf[0..avail_len].copy_from_slice(__input);
15780            Bytes::new(&payload_buf)
15781        } else {
15782            Bytes::new(__input)
15783        };
15784        let mut __struct = Self::default();
15785        __struct.custom_mode = buf.get_u32_le();
15786        let tmp = buf.get_u8();
15787        __struct.mavtype =
15788            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15789                enum_type: "MavType",
15790                value: tmp as u64,
15791            })?;
15792        let tmp = buf.get_u8();
15793        __struct.autopilot =
15794            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15795                enum_type: "MavAutopilot",
15796                value: tmp as u64,
15797            })?;
15798        let tmp = buf.get_u8();
15799        __struct.base_mode =
15800            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15801                flag_type: "MavModeFlag",
15802                value: tmp as u64,
15803            })?;
15804        let tmp = buf.get_u8();
15805        __struct.system_status =
15806            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15807                enum_type: "MavState",
15808                value: tmp as u64,
15809            })?;
15810        __struct.mavlink_version = buf.get_u8();
15811        Ok(__struct)
15812    }
15813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15814        let mut __tmp = BytesMut::new(bytes);
15815        #[allow(clippy::absurd_extreme_comparisons)]
15816        #[allow(unused_comparisons)]
15817        if __tmp.remaining() < Self::ENCODED_LEN {
15818            panic!(
15819                "buffer is too small (need {} bytes, but got {})",
15820                Self::ENCODED_LEN,
15821                __tmp.remaining(),
15822            )
15823        }
15824        __tmp.put_u32_le(self.custom_mode);
15825        __tmp.put_u8(self.mavtype as u8);
15826        __tmp.put_u8(self.autopilot as u8);
15827        __tmp.put_u8(self.base_mode.bits());
15828        __tmp.put_u8(self.system_status as u8);
15829        __tmp.put_u8(self.mavlink_version);
15830        if matches!(version, MavlinkVersion::V2) {
15831            let len = __tmp.len();
15832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15833        } else {
15834            __tmp.len()
15835        }
15836    }
15837}
15838#[doc = "The IMU readings in SI units in NED body frame."]
15839#[doc = ""]
15840#[doc = "ID: 105"]
15841#[derive(Debug, Clone, PartialEq)]
15842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15844#[cfg_attr(feature = "ts", derive(TS))]
15845#[cfg_attr(feature = "ts", ts(export))]
15846pub struct HIGHRES_IMU_DATA {
15847    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15848    pub time_usec: u64,
15849    #[doc = "X acceleration"]
15850    pub xacc: f32,
15851    #[doc = "Y acceleration"]
15852    pub yacc: f32,
15853    #[doc = "Z acceleration"]
15854    pub zacc: f32,
15855    #[doc = "Angular speed around X axis"]
15856    pub xgyro: f32,
15857    #[doc = "Angular speed around Y axis"]
15858    pub ygyro: f32,
15859    #[doc = "Angular speed around Z axis"]
15860    pub zgyro: f32,
15861    #[doc = "X Magnetic field"]
15862    pub xmag: f32,
15863    #[doc = "Y Magnetic field"]
15864    pub ymag: f32,
15865    #[doc = "Z Magnetic field"]
15866    pub zmag: f32,
15867    #[doc = "Absolute pressure"]
15868    pub abs_pressure: f32,
15869    #[doc = "Differential pressure"]
15870    pub diff_pressure: f32,
15871    #[doc = "Altitude calculated from pressure"]
15872    pub pressure_alt: f32,
15873    #[doc = "Temperature"]
15874    pub temperature: f32,
15875    #[doc = "Bitmap for fields that have updated since last message"]
15876    pub fields_updated: HighresImuUpdatedFlags,
15877    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15879    pub id: u8,
15880}
15881impl HIGHRES_IMU_DATA {
15882    pub const ENCODED_LEN: usize = 63usize;
15883    pub const DEFAULT: Self = Self {
15884        time_usec: 0_u64,
15885        xacc: 0.0_f32,
15886        yacc: 0.0_f32,
15887        zacc: 0.0_f32,
15888        xgyro: 0.0_f32,
15889        ygyro: 0.0_f32,
15890        zgyro: 0.0_f32,
15891        xmag: 0.0_f32,
15892        ymag: 0.0_f32,
15893        zmag: 0.0_f32,
15894        abs_pressure: 0.0_f32,
15895        diff_pressure: 0.0_f32,
15896        pressure_alt: 0.0_f32,
15897        temperature: 0.0_f32,
15898        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15899        id: 0_u8,
15900    };
15901    #[cfg(feature = "arbitrary")]
15902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15903        use arbitrary::{Arbitrary, Unstructured};
15904        let mut buf = [0u8; 1024];
15905        rng.fill_bytes(&mut buf);
15906        let mut unstructured = Unstructured::new(&buf);
15907        Self::arbitrary(&mut unstructured).unwrap_or_default()
15908    }
15909}
15910impl Default for HIGHRES_IMU_DATA {
15911    fn default() -> Self {
15912        Self::DEFAULT.clone()
15913    }
15914}
15915impl MessageData for HIGHRES_IMU_DATA {
15916    type Message = MavMessage;
15917    const ID: u32 = 105u32;
15918    const NAME: &'static str = "HIGHRES_IMU";
15919    const EXTRA_CRC: u8 = 93u8;
15920    const ENCODED_LEN: usize = 63usize;
15921    fn deser(
15922        _version: MavlinkVersion,
15923        __input: &[u8],
15924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15925        let avail_len = __input.len();
15926        let mut payload_buf = [0; Self::ENCODED_LEN];
15927        let mut buf = if avail_len < Self::ENCODED_LEN {
15928            payload_buf[0..avail_len].copy_from_slice(__input);
15929            Bytes::new(&payload_buf)
15930        } else {
15931            Bytes::new(__input)
15932        };
15933        let mut __struct = Self::default();
15934        __struct.time_usec = buf.get_u64_le();
15935        __struct.xacc = buf.get_f32_le();
15936        __struct.yacc = buf.get_f32_le();
15937        __struct.zacc = buf.get_f32_le();
15938        __struct.xgyro = buf.get_f32_le();
15939        __struct.ygyro = buf.get_f32_le();
15940        __struct.zgyro = buf.get_f32_le();
15941        __struct.xmag = buf.get_f32_le();
15942        __struct.ymag = buf.get_f32_le();
15943        __struct.zmag = buf.get_f32_le();
15944        __struct.abs_pressure = buf.get_f32_le();
15945        __struct.diff_pressure = buf.get_f32_le();
15946        __struct.pressure_alt = buf.get_f32_le();
15947        __struct.temperature = buf.get_f32_le();
15948        let tmp = buf.get_u16_le();
15949        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(tmp).ok_or(
15950            ::mavlink_core::error::ParserError::InvalidFlag {
15951                flag_type: "HighresImuUpdatedFlags",
15952                value: tmp as u64,
15953            },
15954        )?;
15955        __struct.id = buf.get_u8();
15956        Ok(__struct)
15957    }
15958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15959        let mut __tmp = BytesMut::new(bytes);
15960        #[allow(clippy::absurd_extreme_comparisons)]
15961        #[allow(unused_comparisons)]
15962        if __tmp.remaining() < Self::ENCODED_LEN {
15963            panic!(
15964                "buffer is too small (need {} bytes, but got {})",
15965                Self::ENCODED_LEN,
15966                __tmp.remaining(),
15967            )
15968        }
15969        __tmp.put_u64_le(self.time_usec);
15970        __tmp.put_f32_le(self.xacc);
15971        __tmp.put_f32_le(self.yacc);
15972        __tmp.put_f32_le(self.zacc);
15973        __tmp.put_f32_le(self.xgyro);
15974        __tmp.put_f32_le(self.ygyro);
15975        __tmp.put_f32_le(self.zgyro);
15976        __tmp.put_f32_le(self.xmag);
15977        __tmp.put_f32_le(self.ymag);
15978        __tmp.put_f32_le(self.zmag);
15979        __tmp.put_f32_le(self.abs_pressure);
15980        __tmp.put_f32_le(self.diff_pressure);
15981        __tmp.put_f32_le(self.pressure_alt);
15982        __tmp.put_f32_le(self.temperature);
15983        __tmp.put_u16_le(self.fields_updated.bits());
15984        if matches!(version, MavlinkVersion::V2) {
15985            __tmp.put_u8(self.id);
15986            let len = __tmp.len();
15987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15988        } else {
15989            __tmp.len()
15990        }
15991    }
15992}
15993#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15994#[doc = "Message appropriate for high latency connections like Iridium."]
15995#[doc = ""]
15996#[doc = "ID: 234"]
15997#[derive(Debug, Clone, PartialEq)]
15998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16000#[cfg_attr(feature = "ts", derive(TS))]
16001#[cfg_attr(feature = "ts", ts(export))]
16002pub struct HIGH_LATENCY_DATA {
16003    #[doc = "A bitfield for use for autopilot-specific flags."]
16004    pub custom_mode: u32,
16005    #[doc = "Latitude"]
16006    pub latitude: i32,
16007    #[doc = "Longitude"]
16008    pub longitude: i32,
16009    #[doc = "roll"]
16010    pub roll: i16,
16011    #[doc = "pitch"]
16012    pub pitch: i16,
16013    #[doc = "heading"]
16014    pub heading: u16,
16015    #[doc = "heading setpoint"]
16016    pub heading_sp: i16,
16017    #[doc = "Altitude above mean sea level"]
16018    pub altitude_amsl: i16,
16019    #[doc = "Altitude setpoint relative to the home position"]
16020    pub altitude_sp: i16,
16021    #[doc = "distance to target"]
16022    pub wp_distance: u16,
16023    #[doc = "Bitmap of enabled system modes."]
16024    pub base_mode: MavModeFlag,
16025    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16026    pub landed_state: MavLandedState,
16027    #[doc = "throttle (percentage)"]
16028    pub throttle: i8,
16029    #[doc = "airspeed"]
16030    pub airspeed: u8,
16031    #[doc = "airspeed setpoint"]
16032    pub airspeed_sp: u8,
16033    #[doc = "groundspeed"]
16034    pub groundspeed: u8,
16035    #[doc = "climb rate"]
16036    pub climb_rate: i8,
16037    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16038    pub gps_nsat: u8,
16039    #[doc = "GPS Fix type."]
16040    pub gps_fix_type: GpsFixType,
16041    #[doc = "Remaining battery (percentage)"]
16042    pub battery_remaining: u8,
16043    #[doc = "Autopilot temperature (degrees C)"]
16044    pub temperature: i8,
16045    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16046    pub temperature_air: i8,
16047    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16048    pub failsafe: u8,
16049    #[doc = "current waypoint number"]
16050    pub wp_num: u8,
16051}
16052impl HIGH_LATENCY_DATA {
16053    pub const ENCODED_LEN: usize = 40usize;
16054    pub const DEFAULT: Self = Self {
16055        custom_mode: 0_u32,
16056        latitude: 0_i32,
16057        longitude: 0_i32,
16058        roll: 0_i16,
16059        pitch: 0_i16,
16060        heading: 0_u16,
16061        heading_sp: 0_i16,
16062        altitude_amsl: 0_i16,
16063        altitude_sp: 0_i16,
16064        wp_distance: 0_u16,
16065        base_mode: MavModeFlag::DEFAULT,
16066        landed_state: MavLandedState::DEFAULT,
16067        throttle: 0_i8,
16068        airspeed: 0_u8,
16069        airspeed_sp: 0_u8,
16070        groundspeed: 0_u8,
16071        climb_rate: 0_i8,
16072        gps_nsat: 0_u8,
16073        gps_fix_type: GpsFixType::DEFAULT,
16074        battery_remaining: 0_u8,
16075        temperature: 0_i8,
16076        temperature_air: 0_i8,
16077        failsafe: 0_u8,
16078        wp_num: 0_u8,
16079    };
16080    #[cfg(feature = "arbitrary")]
16081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16082        use arbitrary::{Arbitrary, Unstructured};
16083        let mut buf = [0u8; 1024];
16084        rng.fill_bytes(&mut buf);
16085        let mut unstructured = Unstructured::new(&buf);
16086        Self::arbitrary(&mut unstructured).unwrap_or_default()
16087    }
16088}
16089impl Default for HIGH_LATENCY_DATA {
16090    fn default() -> Self {
16091        Self::DEFAULT.clone()
16092    }
16093}
16094impl MessageData for HIGH_LATENCY_DATA {
16095    type Message = MavMessage;
16096    const ID: u32 = 234u32;
16097    const NAME: &'static str = "HIGH_LATENCY";
16098    const EXTRA_CRC: u8 = 150u8;
16099    const ENCODED_LEN: usize = 40usize;
16100    fn deser(
16101        _version: MavlinkVersion,
16102        __input: &[u8],
16103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16104        let avail_len = __input.len();
16105        let mut payload_buf = [0; Self::ENCODED_LEN];
16106        let mut buf = if avail_len < Self::ENCODED_LEN {
16107            payload_buf[0..avail_len].copy_from_slice(__input);
16108            Bytes::new(&payload_buf)
16109        } else {
16110            Bytes::new(__input)
16111        };
16112        let mut __struct = Self::default();
16113        __struct.custom_mode = buf.get_u32_le();
16114        __struct.latitude = buf.get_i32_le();
16115        __struct.longitude = buf.get_i32_le();
16116        __struct.roll = buf.get_i16_le();
16117        __struct.pitch = buf.get_i16_le();
16118        __struct.heading = buf.get_u16_le();
16119        __struct.heading_sp = buf.get_i16_le();
16120        __struct.altitude_amsl = buf.get_i16_le();
16121        __struct.altitude_sp = buf.get_i16_le();
16122        __struct.wp_distance = buf.get_u16_le();
16123        let tmp = buf.get_u8();
16124        __struct.base_mode =
16125            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16126                flag_type: "MavModeFlag",
16127                value: tmp as u64,
16128            })?;
16129        let tmp = buf.get_u8();
16130        __struct.landed_state =
16131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16132                enum_type: "MavLandedState",
16133                value: tmp as u64,
16134            })?;
16135        __struct.throttle = buf.get_i8();
16136        __struct.airspeed = buf.get_u8();
16137        __struct.airspeed_sp = buf.get_u8();
16138        __struct.groundspeed = buf.get_u8();
16139        __struct.climb_rate = buf.get_i8();
16140        __struct.gps_nsat = buf.get_u8();
16141        let tmp = buf.get_u8();
16142        __struct.gps_fix_type =
16143            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16144                enum_type: "GpsFixType",
16145                value: tmp as u64,
16146            })?;
16147        __struct.battery_remaining = buf.get_u8();
16148        __struct.temperature = buf.get_i8();
16149        __struct.temperature_air = buf.get_i8();
16150        __struct.failsafe = buf.get_u8();
16151        __struct.wp_num = buf.get_u8();
16152        Ok(__struct)
16153    }
16154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16155        let mut __tmp = BytesMut::new(bytes);
16156        #[allow(clippy::absurd_extreme_comparisons)]
16157        #[allow(unused_comparisons)]
16158        if __tmp.remaining() < Self::ENCODED_LEN {
16159            panic!(
16160                "buffer is too small (need {} bytes, but got {})",
16161                Self::ENCODED_LEN,
16162                __tmp.remaining(),
16163            )
16164        }
16165        __tmp.put_u32_le(self.custom_mode);
16166        __tmp.put_i32_le(self.latitude);
16167        __tmp.put_i32_le(self.longitude);
16168        __tmp.put_i16_le(self.roll);
16169        __tmp.put_i16_le(self.pitch);
16170        __tmp.put_u16_le(self.heading);
16171        __tmp.put_i16_le(self.heading_sp);
16172        __tmp.put_i16_le(self.altitude_amsl);
16173        __tmp.put_i16_le(self.altitude_sp);
16174        __tmp.put_u16_le(self.wp_distance);
16175        __tmp.put_u8(self.base_mode.bits());
16176        __tmp.put_u8(self.landed_state as u8);
16177        __tmp.put_i8(self.throttle);
16178        __tmp.put_u8(self.airspeed);
16179        __tmp.put_u8(self.airspeed_sp);
16180        __tmp.put_u8(self.groundspeed);
16181        __tmp.put_i8(self.climb_rate);
16182        __tmp.put_u8(self.gps_nsat);
16183        __tmp.put_u8(self.gps_fix_type as u8);
16184        __tmp.put_u8(self.battery_remaining);
16185        __tmp.put_i8(self.temperature);
16186        __tmp.put_i8(self.temperature_air);
16187        __tmp.put_u8(self.failsafe);
16188        __tmp.put_u8(self.wp_num);
16189        if matches!(version, MavlinkVersion::V2) {
16190            let len = __tmp.len();
16191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16192        } else {
16193            __tmp.len()
16194        }
16195    }
16196}
16197#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16198#[doc = ""]
16199#[doc = "ID: 235"]
16200#[derive(Debug, Clone, PartialEq)]
16201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16203#[cfg_attr(feature = "ts", derive(TS))]
16204#[cfg_attr(feature = "ts", ts(export))]
16205pub struct HIGH_LATENCY2_DATA {
16206    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16207    pub timestamp: u32,
16208    #[doc = "Latitude"]
16209    pub latitude: i32,
16210    #[doc = "Longitude"]
16211    pub longitude: i32,
16212    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16213    pub custom_mode: u16,
16214    #[doc = "Altitude above mean sea level"]
16215    pub altitude: i16,
16216    #[doc = "Altitude setpoint"]
16217    pub target_altitude: i16,
16218    #[doc = "Distance to target waypoint or position"]
16219    pub target_distance: u16,
16220    #[doc = "Current waypoint number"]
16221    pub wp_num: u16,
16222    #[doc = "Bitmap of failure flags."]
16223    pub failure_flags: HlFailureFlag,
16224    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16225    pub mavtype: MavType,
16226    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16227    pub autopilot: MavAutopilot,
16228    #[doc = "Heading"]
16229    pub heading: u8,
16230    #[doc = "Heading setpoint"]
16231    pub target_heading: u8,
16232    #[doc = "Throttle"]
16233    pub throttle: u8,
16234    #[doc = "Airspeed"]
16235    pub airspeed: u8,
16236    #[doc = "Airspeed setpoint"]
16237    pub airspeed_sp: u8,
16238    #[doc = "Groundspeed"]
16239    pub groundspeed: u8,
16240    #[doc = "Windspeed"]
16241    pub windspeed: u8,
16242    #[doc = "Wind heading"]
16243    pub wind_heading: u8,
16244    #[doc = "Maximum error horizontal position since last message"]
16245    pub eph: u8,
16246    #[doc = "Maximum error vertical position since last message"]
16247    pub epv: u8,
16248    #[doc = "Air temperature"]
16249    pub temperature_air: i8,
16250    #[doc = "Maximum climb rate magnitude since last message"]
16251    pub climb_rate: i8,
16252    #[doc = "Battery level (-1 if field not provided)."]
16253    pub battery: i8,
16254    #[doc = "Field for custom payload."]
16255    pub custom0: i8,
16256    #[doc = "Field for custom payload."]
16257    pub custom1: i8,
16258    #[doc = "Field for custom payload."]
16259    pub custom2: i8,
16260}
16261impl HIGH_LATENCY2_DATA {
16262    pub const ENCODED_LEN: usize = 42usize;
16263    pub const DEFAULT: Self = Self {
16264        timestamp: 0_u32,
16265        latitude: 0_i32,
16266        longitude: 0_i32,
16267        custom_mode: 0_u16,
16268        altitude: 0_i16,
16269        target_altitude: 0_i16,
16270        target_distance: 0_u16,
16271        wp_num: 0_u16,
16272        failure_flags: HlFailureFlag::DEFAULT,
16273        mavtype: MavType::DEFAULT,
16274        autopilot: MavAutopilot::DEFAULT,
16275        heading: 0_u8,
16276        target_heading: 0_u8,
16277        throttle: 0_u8,
16278        airspeed: 0_u8,
16279        airspeed_sp: 0_u8,
16280        groundspeed: 0_u8,
16281        windspeed: 0_u8,
16282        wind_heading: 0_u8,
16283        eph: 0_u8,
16284        epv: 0_u8,
16285        temperature_air: 0_i8,
16286        climb_rate: 0_i8,
16287        battery: 0_i8,
16288        custom0: 0_i8,
16289        custom1: 0_i8,
16290        custom2: 0_i8,
16291    };
16292    #[cfg(feature = "arbitrary")]
16293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16294        use arbitrary::{Arbitrary, Unstructured};
16295        let mut buf = [0u8; 1024];
16296        rng.fill_bytes(&mut buf);
16297        let mut unstructured = Unstructured::new(&buf);
16298        Self::arbitrary(&mut unstructured).unwrap_or_default()
16299    }
16300}
16301impl Default for HIGH_LATENCY2_DATA {
16302    fn default() -> Self {
16303        Self::DEFAULT.clone()
16304    }
16305}
16306impl MessageData for HIGH_LATENCY2_DATA {
16307    type Message = MavMessage;
16308    const ID: u32 = 235u32;
16309    const NAME: &'static str = "HIGH_LATENCY2";
16310    const EXTRA_CRC: u8 = 179u8;
16311    const ENCODED_LEN: usize = 42usize;
16312    fn deser(
16313        _version: MavlinkVersion,
16314        __input: &[u8],
16315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16316        let avail_len = __input.len();
16317        let mut payload_buf = [0; Self::ENCODED_LEN];
16318        let mut buf = if avail_len < Self::ENCODED_LEN {
16319            payload_buf[0..avail_len].copy_from_slice(__input);
16320            Bytes::new(&payload_buf)
16321        } else {
16322            Bytes::new(__input)
16323        };
16324        let mut __struct = Self::default();
16325        __struct.timestamp = buf.get_u32_le();
16326        __struct.latitude = buf.get_i32_le();
16327        __struct.longitude = buf.get_i32_le();
16328        __struct.custom_mode = buf.get_u16_le();
16329        __struct.altitude = buf.get_i16_le();
16330        __struct.target_altitude = buf.get_i16_le();
16331        __struct.target_distance = buf.get_u16_le();
16332        __struct.wp_num = buf.get_u16_le();
16333        let tmp = buf.get_u16_le();
16334        __struct.failure_flags = HlFailureFlag::from_bits(tmp).ok_or(
16335            ::mavlink_core::error::ParserError::InvalidFlag {
16336                flag_type: "HlFailureFlag",
16337                value: tmp as u64,
16338            },
16339        )?;
16340        let tmp = buf.get_u8();
16341        __struct.mavtype =
16342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16343                enum_type: "MavType",
16344                value: tmp as u64,
16345            })?;
16346        let tmp = buf.get_u8();
16347        __struct.autopilot =
16348            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16349                enum_type: "MavAutopilot",
16350                value: tmp as u64,
16351            })?;
16352        __struct.heading = buf.get_u8();
16353        __struct.target_heading = buf.get_u8();
16354        __struct.throttle = buf.get_u8();
16355        __struct.airspeed = buf.get_u8();
16356        __struct.airspeed_sp = buf.get_u8();
16357        __struct.groundspeed = buf.get_u8();
16358        __struct.windspeed = buf.get_u8();
16359        __struct.wind_heading = buf.get_u8();
16360        __struct.eph = buf.get_u8();
16361        __struct.epv = buf.get_u8();
16362        __struct.temperature_air = buf.get_i8();
16363        __struct.climb_rate = buf.get_i8();
16364        __struct.battery = buf.get_i8();
16365        __struct.custom0 = buf.get_i8();
16366        __struct.custom1 = buf.get_i8();
16367        __struct.custom2 = buf.get_i8();
16368        Ok(__struct)
16369    }
16370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16371        let mut __tmp = BytesMut::new(bytes);
16372        #[allow(clippy::absurd_extreme_comparisons)]
16373        #[allow(unused_comparisons)]
16374        if __tmp.remaining() < Self::ENCODED_LEN {
16375            panic!(
16376                "buffer is too small (need {} bytes, but got {})",
16377                Self::ENCODED_LEN,
16378                __tmp.remaining(),
16379            )
16380        }
16381        __tmp.put_u32_le(self.timestamp);
16382        __tmp.put_i32_le(self.latitude);
16383        __tmp.put_i32_le(self.longitude);
16384        __tmp.put_u16_le(self.custom_mode);
16385        __tmp.put_i16_le(self.altitude);
16386        __tmp.put_i16_le(self.target_altitude);
16387        __tmp.put_u16_le(self.target_distance);
16388        __tmp.put_u16_le(self.wp_num);
16389        __tmp.put_u16_le(self.failure_flags.bits());
16390        __tmp.put_u8(self.mavtype as u8);
16391        __tmp.put_u8(self.autopilot as u8);
16392        __tmp.put_u8(self.heading);
16393        __tmp.put_u8(self.target_heading);
16394        __tmp.put_u8(self.throttle);
16395        __tmp.put_u8(self.airspeed);
16396        __tmp.put_u8(self.airspeed_sp);
16397        __tmp.put_u8(self.groundspeed);
16398        __tmp.put_u8(self.windspeed);
16399        __tmp.put_u8(self.wind_heading);
16400        __tmp.put_u8(self.eph);
16401        __tmp.put_u8(self.epv);
16402        __tmp.put_i8(self.temperature_air);
16403        __tmp.put_i8(self.climb_rate);
16404        __tmp.put_i8(self.battery);
16405        __tmp.put_i8(self.custom0);
16406        __tmp.put_i8(self.custom1);
16407        __tmp.put_i8(self.custom2);
16408        if matches!(version, MavlinkVersion::V2) {
16409            let len = __tmp.len();
16410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16411        } else {
16412            __tmp.len()
16413        }
16414    }
16415}
16416#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16417#[doc = ""]
16418#[doc = "ID: 93"]
16419#[derive(Debug, Clone, PartialEq)]
16420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16422#[cfg_attr(feature = "ts", derive(TS))]
16423#[cfg_attr(feature = "ts", ts(export))]
16424pub struct HIL_ACTUATOR_CONTROLS_DATA {
16425    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16426    pub time_usec: u64,
16427    #[doc = "Flags bitmask."]
16428    pub flags: HilActuatorControlsFlags,
16429    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16430    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16431    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16432    pub controls: [f32; 16],
16433    #[doc = "System mode. Includes arming state."]
16434    pub mode: MavModeFlag,
16435}
16436impl HIL_ACTUATOR_CONTROLS_DATA {
16437    pub const ENCODED_LEN: usize = 81usize;
16438    pub const DEFAULT: Self = Self {
16439        time_usec: 0_u64,
16440        flags: HilActuatorControlsFlags::DEFAULT,
16441        controls: [0.0_f32; 16usize],
16442        mode: MavModeFlag::DEFAULT,
16443    };
16444    #[cfg(feature = "arbitrary")]
16445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16446        use arbitrary::{Arbitrary, Unstructured};
16447        let mut buf = [0u8; 1024];
16448        rng.fill_bytes(&mut buf);
16449        let mut unstructured = Unstructured::new(&buf);
16450        Self::arbitrary(&mut unstructured).unwrap_or_default()
16451    }
16452}
16453impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16454    fn default() -> Self {
16455        Self::DEFAULT.clone()
16456    }
16457}
16458impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16459    type Message = MavMessage;
16460    const ID: u32 = 93u32;
16461    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16462    const EXTRA_CRC: u8 = 47u8;
16463    const ENCODED_LEN: usize = 81usize;
16464    fn deser(
16465        _version: MavlinkVersion,
16466        __input: &[u8],
16467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16468        let avail_len = __input.len();
16469        let mut payload_buf = [0; Self::ENCODED_LEN];
16470        let mut buf = if avail_len < Self::ENCODED_LEN {
16471            payload_buf[0..avail_len].copy_from_slice(__input);
16472            Bytes::new(&payload_buf)
16473        } else {
16474            Bytes::new(__input)
16475        };
16476        let mut __struct = Self::default();
16477        __struct.time_usec = buf.get_u64_le();
16478        let tmp = buf.get_u64_le();
16479        __struct.flags = HilActuatorControlsFlags::from_bits(tmp).ok_or(
16480            ::mavlink_core::error::ParserError::InvalidFlag {
16481                flag_type: "HilActuatorControlsFlags",
16482                value: tmp as u64,
16483            },
16484        )?;
16485        for v in &mut __struct.controls {
16486            let val = buf.get_f32_le();
16487            *v = val;
16488        }
16489        let tmp = buf.get_u8();
16490        __struct.mode =
16491            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16492                flag_type: "MavModeFlag",
16493                value: tmp as u64,
16494            })?;
16495        Ok(__struct)
16496    }
16497    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16498        let mut __tmp = BytesMut::new(bytes);
16499        #[allow(clippy::absurd_extreme_comparisons)]
16500        #[allow(unused_comparisons)]
16501        if __tmp.remaining() < Self::ENCODED_LEN {
16502            panic!(
16503                "buffer is too small (need {} bytes, but got {})",
16504                Self::ENCODED_LEN,
16505                __tmp.remaining(),
16506            )
16507        }
16508        __tmp.put_u64_le(self.time_usec);
16509        __tmp.put_u64_le(self.flags.bits());
16510        for val in &self.controls {
16511            __tmp.put_f32_le(*val);
16512        }
16513        __tmp.put_u8(self.mode.bits());
16514        if matches!(version, MavlinkVersion::V2) {
16515            let len = __tmp.len();
16516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16517        } else {
16518            __tmp.len()
16519        }
16520    }
16521}
16522#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16523#[doc = ""]
16524#[doc = "ID: 91"]
16525#[derive(Debug, Clone, PartialEq)]
16526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16528#[cfg_attr(feature = "ts", derive(TS))]
16529#[cfg_attr(feature = "ts", ts(export))]
16530pub struct HIL_CONTROLS_DATA {
16531    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16532    pub time_usec: u64,
16533    #[doc = "Control output -1 .. 1"]
16534    pub roll_ailerons: f32,
16535    #[doc = "Control output -1 .. 1"]
16536    pub pitch_elevator: f32,
16537    #[doc = "Control output -1 .. 1"]
16538    pub yaw_rudder: f32,
16539    #[doc = "Throttle 0 .. 1"]
16540    pub throttle: f32,
16541    #[doc = "Aux 1, -1 .. 1"]
16542    pub aux1: f32,
16543    #[doc = "Aux 2, -1 .. 1"]
16544    pub aux2: f32,
16545    #[doc = "Aux 3, -1 .. 1"]
16546    pub aux3: f32,
16547    #[doc = "Aux 4, -1 .. 1"]
16548    pub aux4: f32,
16549    #[doc = "System mode."]
16550    pub mode: MavMode,
16551    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16552    pub nav_mode: u8,
16553}
16554impl HIL_CONTROLS_DATA {
16555    pub const ENCODED_LEN: usize = 42usize;
16556    pub const DEFAULT: Self = Self {
16557        time_usec: 0_u64,
16558        roll_ailerons: 0.0_f32,
16559        pitch_elevator: 0.0_f32,
16560        yaw_rudder: 0.0_f32,
16561        throttle: 0.0_f32,
16562        aux1: 0.0_f32,
16563        aux2: 0.0_f32,
16564        aux3: 0.0_f32,
16565        aux4: 0.0_f32,
16566        mode: MavMode::DEFAULT,
16567        nav_mode: 0_u8,
16568    };
16569    #[cfg(feature = "arbitrary")]
16570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16571        use arbitrary::{Arbitrary, Unstructured};
16572        let mut buf = [0u8; 1024];
16573        rng.fill_bytes(&mut buf);
16574        let mut unstructured = Unstructured::new(&buf);
16575        Self::arbitrary(&mut unstructured).unwrap_or_default()
16576    }
16577}
16578impl Default for HIL_CONTROLS_DATA {
16579    fn default() -> Self {
16580        Self::DEFAULT.clone()
16581    }
16582}
16583impl MessageData for HIL_CONTROLS_DATA {
16584    type Message = MavMessage;
16585    const ID: u32 = 91u32;
16586    const NAME: &'static str = "HIL_CONTROLS";
16587    const EXTRA_CRC: u8 = 63u8;
16588    const ENCODED_LEN: usize = 42usize;
16589    fn deser(
16590        _version: MavlinkVersion,
16591        __input: &[u8],
16592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16593        let avail_len = __input.len();
16594        let mut payload_buf = [0; Self::ENCODED_LEN];
16595        let mut buf = if avail_len < Self::ENCODED_LEN {
16596            payload_buf[0..avail_len].copy_from_slice(__input);
16597            Bytes::new(&payload_buf)
16598        } else {
16599            Bytes::new(__input)
16600        };
16601        let mut __struct = Self::default();
16602        __struct.time_usec = buf.get_u64_le();
16603        __struct.roll_ailerons = buf.get_f32_le();
16604        __struct.pitch_elevator = buf.get_f32_le();
16605        __struct.yaw_rudder = buf.get_f32_le();
16606        __struct.throttle = buf.get_f32_le();
16607        __struct.aux1 = buf.get_f32_le();
16608        __struct.aux2 = buf.get_f32_le();
16609        __struct.aux3 = buf.get_f32_le();
16610        __struct.aux4 = buf.get_f32_le();
16611        let tmp = buf.get_u8();
16612        __struct.mode =
16613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16614                enum_type: "MavMode",
16615                value: tmp as u64,
16616            })?;
16617        __struct.nav_mode = buf.get_u8();
16618        Ok(__struct)
16619    }
16620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16621        let mut __tmp = BytesMut::new(bytes);
16622        #[allow(clippy::absurd_extreme_comparisons)]
16623        #[allow(unused_comparisons)]
16624        if __tmp.remaining() < Self::ENCODED_LEN {
16625            panic!(
16626                "buffer is too small (need {} bytes, but got {})",
16627                Self::ENCODED_LEN,
16628                __tmp.remaining(),
16629            )
16630        }
16631        __tmp.put_u64_le(self.time_usec);
16632        __tmp.put_f32_le(self.roll_ailerons);
16633        __tmp.put_f32_le(self.pitch_elevator);
16634        __tmp.put_f32_le(self.yaw_rudder);
16635        __tmp.put_f32_le(self.throttle);
16636        __tmp.put_f32_le(self.aux1);
16637        __tmp.put_f32_le(self.aux2);
16638        __tmp.put_f32_le(self.aux3);
16639        __tmp.put_f32_le(self.aux4);
16640        __tmp.put_u8(self.mode as u8);
16641        __tmp.put_u8(self.nav_mode);
16642        if matches!(version, MavlinkVersion::V2) {
16643            let len = __tmp.len();
16644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16645        } else {
16646            __tmp.len()
16647        }
16648    }
16649}
16650#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16651#[doc = ""]
16652#[doc = "ID: 113"]
16653#[derive(Debug, Clone, PartialEq)]
16654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16656#[cfg_attr(feature = "ts", derive(TS))]
16657#[cfg_attr(feature = "ts", ts(export))]
16658pub struct HIL_GPS_DATA {
16659    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16660    pub time_usec: u64,
16661    #[doc = "Latitude (WGS84)"]
16662    pub lat: i32,
16663    #[doc = "Longitude (WGS84)"]
16664    pub lon: i32,
16665    #[doc = "Altitude (MSL). Positive for up."]
16666    pub alt: i32,
16667    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16668    pub eph: u16,
16669    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16670    pub epv: u16,
16671    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16672    pub vel: u16,
16673    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16674    pub vn: i16,
16675    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16676    pub ve: i16,
16677    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16678    pub vd: i16,
16679    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16680    pub cog: u16,
16681    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16682    pub fix_type: u8,
16683    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16684    pub satellites_visible: u8,
16685    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16687    pub id: u8,
16688    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16690    pub yaw: u16,
16691}
16692impl HIL_GPS_DATA {
16693    pub const ENCODED_LEN: usize = 39usize;
16694    pub const DEFAULT: Self = Self {
16695        time_usec: 0_u64,
16696        lat: 0_i32,
16697        lon: 0_i32,
16698        alt: 0_i32,
16699        eph: 0_u16,
16700        epv: 0_u16,
16701        vel: 0_u16,
16702        vn: 0_i16,
16703        ve: 0_i16,
16704        vd: 0_i16,
16705        cog: 0_u16,
16706        fix_type: 0_u8,
16707        satellites_visible: 0_u8,
16708        id: 0_u8,
16709        yaw: 0_u16,
16710    };
16711    #[cfg(feature = "arbitrary")]
16712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16713        use arbitrary::{Arbitrary, Unstructured};
16714        let mut buf = [0u8; 1024];
16715        rng.fill_bytes(&mut buf);
16716        let mut unstructured = Unstructured::new(&buf);
16717        Self::arbitrary(&mut unstructured).unwrap_or_default()
16718    }
16719}
16720impl Default for HIL_GPS_DATA {
16721    fn default() -> Self {
16722        Self::DEFAULT.clone()
16723    }
16724}
16725impl MessageData for HIL_GPS_DATA {
16726    type Message = MavMessage;
16727    const ID: u32 = 113u32;
16728    const NAME: &'static str = "HIL_GPS";
16729    const EXTRA_CRC: u8 = 124u8;
16730    const ENCODED_LEN: usize = 39usize;
16731    fn deser(
16732        _version: MavlinkVersion,
16733        __input: &[u8],
16734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16735        let avail_len = __input.len();
16736        let mut payload_buf = [0; Self::ENCODED_LEN];
16737        let mut buf = if avail_len < Self::ENCODED_LEN {
16738            payload_buf[0..avail_len].copy_from_slice(__input);
16739            Bytes::new(&payload_buf)
16740        } else {
16741            Bytes::new(__input)
16742        };
16743        let mut __struct = Self::default();
16744        __struct.time_usec = buf.get_u64_le();
16745        __struct.lat = buf.get_i32_le();
16746        __struct.lon = buf.get_i32_le();
16747        __struct.alt = buf.get_i32_le();
16748        __struct.eph = buf.get_u16_le();
16749        __struct.epv = buf.get_u16_le();
16750        __struct.vel = buf.get_u16_le();
16751        __struct.vn = buf.get_i16_le();
16752        __struct.ve = buf.get_i16_le();
16753        __struct.vd = buf.get_i16_le();
16754        __struct.cog = buf.get_u16_le();
16755        __struct.fix_type = buf.get_u8();
16756        __struct.satellites_visible = buf.get_u8();
16757        __struct.id = buf.get_u8();
16758        __struct.yaw = buf.get_u16_le();
16759        Ok(__struct)
16760    }
16761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16762        let mut __tmp = BytesMut::new(bytes);
16763        #[allow(clippy::absurd_extreme_comparisons)]
16764        #[allow(unused_comparisons)]
16765        if __tmp.remaining() < Self::ENCODED_LEN {
16766            panic!(
16767                "buffer is too small (need {} bytes, but got {})",
16768                Self::ENCODED_LEN,
16769                __tmp.remaining(),
16770            )
16771        }
16772        __tmp.put_u64_le(self.time_usec);
16773        __tmp.put_i32_le(self.lat);
16774        __tmp.put_i32_le(self.lon);
16775        __tmp.put_i32_le(self.alt);
16776        __tmp.put_u16_le(self.eph);
16777        __tmp.put_u16_le(self.epv);
16778        __tmp.put_u16_le(self.vel);
16779        __tmp.put_i16_le(self.vn);
16780        __tmp.put_i16_le(self.ve);
16781        __tmp.put_i16_le(self.vd);
16782        __tmp.put_u16_le(self.cog);
16783        __tmp.put_u8(self.fix_type);
16784        __tmp.put_u8(self.satellites_visible);
16785        if matches!(version, MavlinkVersion::V2) {
16786            __tmp.put_u8(self.id);
16787            __tmp.put_u16_le(self.yaw);
16788            let len = __tmp.len();
16789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16790        } else {
16791            __tmp.len()
16792        }
16793    }
16794}
16795#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16796#[doc = ""]
16797#[doc = "ID: 114"]
16798#[derive(Debug, Clone, PartialEq)]
16799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16801#[cfg_attr(feature = "ts", derive(TS))]
16802#[cfg_attr(feature = "ts", ts(export))]
16803pub struct HIL_OPTICAL_FLOW_DATA {
16804    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16805    pub time_usec: u64,
16806    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16807    pub integration_time_us: u32,
16808    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16809    pub integrated_x: f32,
16810    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16811    pub integrated_y: f32,
16812    #[doc = "RH rotation around X axis"]
16813    pub integrated_xgyro: f32,
16814    #[doc = "RH rotation around Y axis"]
16815    pub integrated_ygyro: f32,
16816    #[doc = "RH rotation around Z axis"]
16817    pub integrated_zgyro: f32,
16818    #[doc = "Time since the distance was sampled."]
16819    pub time_delta_distance_us: u32,
16820    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16821    pub distance: f32,
16822    #[doc = "Temperature"]
16823    pub temperature: i16,
16824    #[doc = "Sensor ID"]
16825    pub sensor_id: u8,
16826    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16827    pub quality: u8,
16828}
16829impl HIL_OPTICAL_FLOW_DATA {
16830    pub const ENCODED_LEN: usize = 44usize;
16831    pub const DEFAULT: Self = Self {
16832        time_usec: 0_u64,
16833        integration_time_us: 0_u32,
16834        integrated_x: 0.0_f32,
16835        integrated_y: 0.0_f32,
16836        integrated_xgyro: 0.0_f32,
16837        integrated_ygyro: 0.0_f32,
16838        integrated_zgyro: 0.0_f32,
16839        time_delta_distance_us: 0_u32,
16840        distance: 0.0_f32,
16841        temperature: 0_i16,
16842        sensor_id: 0_u8,
16843        quality: 0_u8,
16844    };
16845    #[cfg(feature = "arbitrary")]
16846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16847        use arbitrary::{Arbitrary, Unstructured};
16848        let mut buf = [0u8; 1024];
16849        rng.fill_bytes(&mut buf);
16850        let mut unstructured = Unstructured::new(&buf);
16851        Self::arbitrary(&mut unstructured).unwrap_or_default()
16852    }
16853}
16854impl Default for HIL_OPTICAL_FLOW_DATA {
16855    fn default() -> Self {
16856        Self::DEFAULT.clone()
16857    }
16858}
16859impl MessageData for HIL_OPTICAL_FLOW_DATA {
16860    type Message = MavMessage;
16861    const ID: u32 = 114u32;
16862    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16863    const EXTRA_CRC: u8 = 237u8;
16864    const ENCODED_LEN: usize = 44usize;
16865    fn deser(
16866        _version: MavlinkVersion,
16867        __input: &[u8],
16868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16869        let avail_len = __input.len();
16870        let mut payload_buf = [0; Self::ENCODED_LEN];
16871        let mut buf = if avail_len < Self::ENCODED_LEN {
16872            payload_buf[0..avail_len].copy_from_slice(__input);
16873            Bytes::new(&payload_buf)
16874        } else {
16875            Bytes::new(__input)
16876        };
16877        let mut __struct = Self::default();
16878        __struct.time_usec = buf.get_u64_le();
16879        __struct.integration_time_us = buf.get_u32_le();
16880        __struct.integrated_x = buf.get_f32_le();
16881        __struct.integrated_y = buf.get_f32_le();
16882        __struct.integrated_xgyro = buf.get_f32_le();
16883        __struct.integrated_ygyro = buf.get_f32_le();
16884        __struct.integrated_zgyro = buf.get_f32_le();
16885        __struct.time_delta_distance_us = buf.get_u32_le();
16886        __struct.distance = buf.get_f32_le();
16887        __struct.temperature = buf.get_i16_le();
16888        __struct.sensor_id = buf.get_u8();
16889        __struct.quality = buf.get_u8();
16890        Ok(__struct)
16891    }
16892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16893        let mut __tmp = BytesMut::new(bytes);
16894        #[allow(clippy::absurd_extreme_comparisons)]
16895        #[allow(unused_comparisons)]
16896        if __tmp.remaining() < Self::ENCODED_LEN {
16897            panic!(
16898                "buffer is too small (need {} bytes, but got {})",
16899                Self::ENCODED_LEN,
16900                __tmp.remaining(),
16901            )
16902        }
16903        __tmp.put_u64_le(self.time_usec);
16904        __tmp.put_u32_le(self.integration_time_us);
16905        __tmp.put_f32_le(self.integrated_x);
16906        __tmp.put_f32_le(self.integrated_y);
16907        __tmp.put_f32_le(self.integrated_xgyro);
16908        __tmp.put_f32_le(self.integrated_ygyro);
16909        __tmp.put_f32_le(self.integrated_zgyro);
16910        __tmp.put_u32_le(self.time_delta_distance_us);
16911        __tmp.put_f32_le(self.distance);
16912        __tmp.put_i16_le(self.temperature);
16913        __tmp.put_u8(self.sensor_id);
16914        __tmp.put_u8(self.quality);
16915        if matches!(version, MavlinkVersion::V2) {
16916            let len = __tmp.len();
16917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16918        } else {
16919            __tmp.len()
16920        }
16921    }
16922}
16923#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16924#[doc = ""]
16925#[doc = "ID: 92"]
16926#[derive(Debug, Clone, PartialEq)]
16927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16929#[cfg_attr(feature = "ts", derive(TS))]
16930#[cfg_attr(feature = "ts", ts(export))]
16931pub struct HIL_RC_INPUTS_RAW_DATA {
16932    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16933    pub time_usec: u64,
16934    #[doc = "RC channel 1 value"]
16935    pub chan1_raw: u16,
16936    #[doc = "RC channel 2 value"]
16937    pub chan2_raw: u16,
16938    #[doc = "RC channel 3 value"]
16939    pub chan3_raw: u16,
16940    #[doc = "RC channel 4 value"]
16941    pub chan4_raw: u16,
16942    #[doc = "RC channel 5 value"]
16943    pub chan5_raw: u16,
16944    #[doc = "RC channel 6 value"]
16945    pub chan6_raw: u16,
16946    #[doc = "RC channel 7 value"]
16947    pub chan7_raw: u16,
16948    #[doc = "RC channel 8 value"]
16949    pub chan8_raw: u16,
16950    #[doc = "RC channel 9 value"]
16951    pub chan9_raw: u16,
16952    #[doc = "RC channel 10 value"]
16953    pub chan10_raw: u16,
16954    #[doc = "RC channel 11 value"]
16955    pub chan11_raw: u16,
16956    #[doc = "RC channel 12 value"]
16957    pub chan12_raw: u16,
16958    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16959    pub rssi: u8,
16960}
16961impl HIL_RC_INPUTS_RAW_DATA {
16962    pub const ENCODED_LEN: usize = 33usize;
16963    pub const DEFAULT: Self = Self {
16964        time_usec: 0_u64,
16965        chan1_raw: 0_u16,
16966        chan2_raw: 0_u16,
16967        chan3_raw: 0_u16,
16968        chan4_raw: 0_u16,
16969        chan5_raw: 0_u16,
16970        chan6_raw: 0_u16,
16971        chan7_raw: 0_u16,
16972        chan8_raw: 0_u16,
16973        chan9_raw: 0_u16,
16974        chan10_raw: 0_u16,
16975        chan11_raw: 0_u16,
16976        chan12_raw: 0_u16,
16977        rssi: 0_u8,
16978    };
16979    #[cfg(feature = "arbitrary")]
16980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16981        use arbitrary::{Arbitrary, Unstructured};
16982        let mut buf = [0u8; 1024];
16983        rng.fill_bytes(&mut buf);
16984        let mut unstructured = Unstructured::new(&buf);
16985        Self::arbitrary(&mut unstructured).unwrap_or_default()
16986    }
16987}
16988impl Default for HIL_RC_INPUTS_RAW_DATA {
16989    fn default() -> Self {
16990        Self::DEFAULT.clone()
16991    }
16992}
16993impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16994    type Message = MavMessage;
16995    const ID: u32 = 92u32;
16996    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16997    const EXTRA_CRC: u8 = 54u8;
16998    const ENCODED_LEN: usize = 33usize;
16999    fn deser(
17000        _version: MavlinkVersion,
17001        __input: &[u8],
17002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17003        let avail_len = __input.len();
17004        let mut payload_buf = [0; Self::ENCODED_LEN];
17005        let mut buf = if avail_len < Self::ENCODED_LEN {
17006            payload_buf[0..avail_len].copy_from_slice(__input);
17007            Bytes::new(&payload_buf)
17008        } else {
17009            Bytes::new(__input)
17010        };
17011        let mut __struct = Self::default();
17012        __struct.time_usec = buf.get_u64_le();
17013        __struct.chan1_raw = buf.get_u16_le();
17014        __struct.chan2_raw = buf.get_u16_le();
17015        __struct.chan3_raw = buf.get_u16_le();
17016        __struct.chan4_raw = buf.get_u16_le();
17017        __struct.chan5_raw = buf.get_u16_le();
17018        __struct.chan6_raw = buf.get_u16_le();
17019        __struct.chan7_raw = buf.get_u16_le();
17020        __struct.chan8_raw = buf.get_u16_le();
17021        __struct.chan9_raw = buf.get_u16_le();
17022        __struct.chan10_raw = buf.get_u16_le();
17023        __struct.chan11_raw = buf.get_u16_le();
17024        __struct.chan12_raw = buf.get_u16_le();
17025        __struct.rssi = buf.get_u8();
17026        Ok(__struct)
17027    }
17028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17029        let mut __tmp = BytesMut::new(bytes);
17030        #[allow(clippy::absurd_extreme_comparisons)]
17031        #[allow(unused_comparisons)]
17032        if __tmp.remaining() < Self::ENCODED_LEN {
17033            panic!(
17034                "buffer is too small (need {} bytes, but got {})",
17035                Self::ENCODED_LEN,
17036                __tmp.remaining(),
17037            )
17038        }
17039        __tmp.put_u64_le(self.time_usec);
17040        __tmp.put_u16_le(self.chan1_raw);
17041        __tmp.put_u16_le(self.chan2_raw);
17042        __tmp.put_u16_le(self.chan3_raw);
17043        __tmp.put_u16_le(self.chan4_raw);
17044        __tmp.put_u16_le(self.chan5_raw);
17045        __tmp.put_u16_le(self.chan6_raw);
17046        __tmp.put_u16_le(self.chan7_raw);
17047        __tmp.put_u16_le(self.chan8_raw);
17048        __tmp.put_u16_le(self.chan9_raw);
17049        __tmp.put_u16_le(self.chan10_raw);
17050        __tmp.put_u16_le(self.chan11_raw);
17051        __tmp.put_u16_le(self.chan12_raw);
17052        __tmp.put_u8(self.rssi);
17053        if matches!(version, MavlinkVersion::V2) {
17054            let len = __tmp.len();
17055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17056        } else {
17057            __tmp.len()
17058        }
17059    }
17060}
17061#[doc = "The IMU readings in SI units in NED body frame."]
17062#[doc = ""]
17063#[doc = "ID: 107"]
17064#[derive(Debug, Clone, PartialEq)]
17065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17067#[cfg_attr(feature = "ts", derive(TS))]
17068#[cfg_attr(feature = "ts", ts(export))]
17069pub struct HIL_SENSOR_DATA {
17070    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17071    pub time_usec: u64,
17072    #[doc = "X acceleration"]
17073    pub xacc: f32,
17074    #[doc = "Y acceleration"]
17075    pub yacc: f32,
17076    #[doc = "Z acceleration"]
17077    pub zacc: f32,
17078    #[doc = "Angular speed around X axis in body frame"]
17079    pub xgyro: f32,
17080    #[doc = "Angular speed around Y axis in body frame"]
17081    pub ygyro: f32,
17082    #[doc = "Angular speed around Z axis in body frame"]
17083    pub zgyro: f32,
17084    #[doc = "X Magnetic field"]
17085    pub xmag: f32,
17086    #[doc = "Y Magnetic field"]
17087    pub ymag: f32,
17088    #[doc = "Z Magnetic field"]
17089    pub zmag: f32,
17090    #[doc = "Absolute pressure"]
17091    pub abs_pressure: f32,
17092    #[doc = "Differential pressure (airspeed)"]
17093    pub diff_pressure: f32,
17094    #[doc = "Altitude calculated from pressure"]
17095    pub pressure_alt: f32,
17096    #[doc = "Temperature"]
17097    pub temperature: f32,
17098    #[doc = "Bitmap for fields that have updated since last message"]
17099    pub fields_updated: HilSensorUpdatedFlags,
17100    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17102    pub id: u8,
17103}
17104impl HIL_SENSOR_DATA {
17105    pub const ENCODED_LEN: usize = 65usize;
17106    pub const DEFAULT: Self = Self {
17107        time_usec: 0_u64,
17108        xacc: 0.0_f32,
17109        yacc: 0.0_f32,
17110        zacc: 0.0_f32,
17111        xgyro: 0.0_f32,
17112        ygyro: 0.0_f32,
17113        zgyro: 0.0_f32,
17114        xmag: 0.0_f32,
17115        ymag: 0.0_f32,
17116        zmag: 0.0_f32,
17117        abs_pressure: 0.0_f32,
17118        diff_pressure: 0.0_f32,
17119        pressure_alt: 0.0_f32,
17120        temperature: 0.0_f32,
17121        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17122        id: 0_u8,
17123    };
17124    #[cfg(feature = "arbitrary")]
17125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17126        use arbitrary::{Arbitrary, Unstructured};
17127        let mut buf = [0u8; 1024];
17128        rng.fill_bytes(&mut buf);
17129        let mut unstructured = Unstructured::new(&buf);
17130        Self::arbitrary(&mut unstructured).unwrap_or_default()
17131    }
17132}
17133impl Default for HIL_SENSOR_DATA {
17134    fn default() -> Self {
17135        Self::DEFAULT.clone()
17136    }
17137}
17138impl MessageData for HIL_SENSOR_DATA {
17139    type Message = MavMessage;
17140    const ID: u32 = 107u32;
17141    const NAME: &'static str = "HIL_SENSOR";
17142    const EXTRA_CRC: u8 = 108u8;
17143    const ENCODED_LEN: usize = 65usize;
17144    fn deser(
17145        _version: MavlinkVersion,
17146        __input: &[u8],
17147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17148        let avail_len = __input.len();
17149        let mut payload_buf = [0; Self::ENCODED_LEN];
17150        let mut buf = if avail_len < Self::ENCODED_LEN {
17151            payload_buf[0..avail_len].copy_from_slice(__input);
17152            Bytes::new(&payload_buf)
17153        } else {
17154            Bytes::new(__input)
17155        };
17156        let mut __struct = Self::default();
17157        __struct.time_usec = buf.get_u64_le();
17158        __struct.xacc = buf.get_f32_le();
17159        __struct.yacc = buf.get_f32_le();
17160        __struct.zacc = buf.get_f32_le();
17161        __struct.xgyro = buf.get_f32_le();
17162        __struct.ygyro = buf.get_f32_le();
17163        __struct.zgyro = buf.get_f32_le();
17164        __struct.xmag = buf.get_f32_le();
17165        __struct.ymag = buf.get_f32_le();
17166        __struct.zmag = buf.get_f32_le();
17167        __struct.abs_pressure = buf.get_f32_le();
17168        __struct.diff_pressure = buf.get_f32_le();
17169        __struct.pressure_alt = buf.get_f32_le();
17170        __struct.temperature = buf.get_f32_le();
17171        let tmp = buf.get_u32_le();
17172        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(tmp).ok_or(
17173            ::mavlink_core::error::ParserError::InvalidFlag {
17174                flag_type: "HilSensorUpdatedFlags",
17175                value: tmp as u64,
17176            },
17177        )?;
17178        __struct.id = buf.get_u8();
17179        Ok(__struct)
17180    }
17181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17182        let mut __tmp = BytesMut::new(bytes);
17183        #[allow(clippy::absurd_extreme_comparisons)]
17184        #[allow(unused_comparisons)]
17185        if __tmp.remaining() < Self::ENCODED_LEN {
17186            panic!(
17187                "buffer is too small (need {} bytes, but got {})",
17188                Self::ENCODED_LEN,
17189                __tmp.remaining(),
17190            )
17191        }
17192        __tmp.put_u64_le(self.time_usec);
17193        __tmp.put_f32_le(self.xacc);
17194        __tmp.put_f32_le(self.yacc);
17195        __tmp.put_f32_le(self.zacc);
17196        __tmp.put_f32_le(self.xgyro);
17197        __tmp.put_f32_le(self.ygyro);
17198        __tmp.put_f32_le(self.zgyro);
17199        __tmp.put_f32_le(self.xmag);
17200        __tmp.put_f32_le(self.ymag);
17201        __tmp.put_f32_le(self.zmag);
17202        __tmp.put_f32_le(self.abs_pressure);
17203        __tmp.put_f32_le(self.diff_pressure);
17204        __tmp.put_f32_le(self.pressure_alt);
17205        __tmp.put_f32_le(self.temperature);
17206        __tmp.put_u32_le(self.fields_updated.bits());
17207        if matches!(version, MavlinkVersion::V2) {
17208            __tmp.put_u8(self.id);
17209            let len = __tmp.len();
17210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17211        } else {
17212            __tmp.len()
17213        }
17214    }
17215}
17216#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17217#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17218#[doc = ""]
17219#[doc = "ID: 90"]
17220#[derive(Debug, Clone, PartialEq)]
17221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17223#[cfg_attr(feature = "ts", derive(TS))]
17224#[cfg_attr(feature = "ts", ts(export))]
17225pub struct HIL_STATE_DATA {
17226    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17227    pub time_usec: u64,
17228    #[doc = "Roll angle"]
17229    pub roll: f32,
17230    #[doc = "Pitch angle"]
17231    pub pitch: f32,
17232    #[doc = "Yaw angle"]
17233    pub yaw: f32,
17234    #[doc = "Body frame roll / phi angular speed"]
17235    pub rollspeed: f32,
17236    #[doc = "Body frame pitch / theta angular speed"]
17237    pub pitchspeed: f32,
17238    #[doc = "Body frame yaw / psi angular speed"]
17239    pub yawspeed: f32,
17240    #[doc = "Latitude"]
17241    pub lat: i32,
17242    #[doc = "Longitude"]
17243    pub lon: i32,
17244    #[doc = "Altitude"]
17245    pub alt: i32,
17246    #[doc = "Ground X Speed (Latitude)"]
17247    pub vx: i16,
17248    #[doc = "Ground Y Speed (Longitude)"]
17249    pub vy: i16,
17250    #[doc = "Ground Z Speed (Altitude)"]
17251    pub vz: i16,
17252    #[doc = "X acceleration"]
17253    pub xacc: i16,
17254    #[doc = "Y acceleration"]
17255    pub yacc: i16,
17256    #[doc = "Z acceleration"]
17257    pub zacc: i16,
17258}
17259impl HIL_STATE_DATA {
17260    pub const ENCODED_LEN: usize = 56usize;
17261    pub const DEFAULT: Self = Self {
17262        time_usec: 0_u64,
17263        roll: 0.0_f32,
17264        pitch: 0.0_f32,
17265        yaw: 0.0_f32,
17266        rollspeed: 0.0_f32,
17267        pitchspeed: 0.0_f32,
17268        yawspeed: 0.0_f32,
17269        lat: 0_i32,
17270        lon: 0_i32,
17271        alt: 0_i32,
17272        vx: 0_i16,
17273        vy: 0_i16,
17274        vz: 0_i16,
17275        xacc: 0_i16,
17276        yacc: 0_i16,
17277        zacc: 0_i16,
17278    };
17279    #[cfg(feature = "arbitrary")]
17280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17281        use arbitrary::{Arbitrary, Unstructured};
17282        let mut buf = [0u8; 1024];
17283        rng.fill_bytes(&mut buf);
17284        let mut unstructured = Unstructured::new(&buf);
17285        Self::arbitrary(&mut unstructured).unwrap_or_default()
17286    }
17287}
17288impl Default for HIL_STATE_DATA {
17289    fn default() -> Self {
17290        Self::DEFAULT.clone()
17291    }
17292}
17293impl MessageData for HIL_STATE_DATA {
17294    type Message = MavMessage;
17295    const ID: u32 = 90u32;
17296    const NAME: &'static str = "HIL_STATE";
17297    const EXTRA_CRC: u8 = 183u8;
17298    const ENCODED_LEN: usize = 56usize;
17299    fn deser(
17300        _version: MavlinkVersion,
17301        __input: &[u8],
17302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17303        let avail_len = __input.len();
17304        let mut payload_buf = [0; Self::ENCODED_LEN];
17305        let mut buf = if avail_len < Self::ENCODED_LEN {
17306            payload_buf[0..avail_len].copy_from_slice(__input);
17307            Bytes::new(&payload_buf)
17308        } else {
17309            Bytes::new(__input)
17310        };
17311        let mut __struct = Self::default();
17312        __struct.time_usec = buf.get_u64_le();
17313        __struct.roll = buf.get_f32_le();
17314        __struct.pitch = buf.get_f32_le();
17315        __struct.yaw = buf.get_f32_le();
17316        __struct.rollspeed = buf.get_f32_le();
17317        __struct.pitchspeed = buf.get_f32_le();
17318        __struct.yawspeed = buf.get_f32_le();
17319        __struct.lat = buf.get_i32_le();
17320        __struct.lon = buf.get_i32_le();
17321        __struct.alt = buf.get_i32_le();
17322        __struct.vx = buf.get_i16_le();
17323        __struct.vy = buf.get_i16_le();
17324        __struct.vz = buf.get_i16_le();
17325        __struct.xacc = buf.get_i16_le();
17326        __struct.yacc = buf.get_i16_le();
17327        __struct.zacc = buf.get_i16_le();
17328        Ok(__struct)
17329    }
17330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17331        let mut __tmp = BytesMut::new(bytes);
17332        #[allow(clippy::absurd_extreme_comparisons)]
17333        #[allow(unused_comparisons)]
17334        if __tmp.remaining() < Self::ENCODED_LEN {
17335            panic!(
17336                "buffer is too small (need {} bytes, but got {})",
17337                Self::ENCODED_LEN,
17338                __tmp.remaining(),
17339            )
17340        }
17341        __tmp.put_u64_le(self.time_usec);
17342        __tmp.put_f32_le(self.roll);
17343        __tmp.put_f32_le(self.pitch);
17344        __tmp.put_f32_le(self.yaw);
17345        __tmp.put_f32_le(self.rollspeed);
17346        __tmp.put_f32_le(self.pitchspeed);
17347        __tmp.put_f32_le(self.yawspeed);
17348        __tmp.put_i32_le(self.lat);
17349        __tmp.put_i32_le(self.lon);
17350        __tmp.put_i32_le(self.alt);
17351        __tmp.put_i16_le(self.vx);
17352        __tmp.put_i16_le(self.vy);
17353        __tmp.put_i16_le(self.vz);
17354        __tmp.put_i16_le(self.xacc);
17355        __tmp.put_i16_le(self.yacc);
17356        __tmp.put_i16_le(self.zacc);
17357        if matches!(version, MavlinkVersion::V2) {
17358            let len = __tmp.len();
17359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17360        } else {
17361            __tmp.len()
17362        }
17363    }
17364}
17365#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17366#[doc = ""]
17367#[doc = "ID: 115"]
17368#[derive(Debug, Clone, PartialEq)]
17369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17371#[cfg_attr(feature = "ts", derive(TS))]
17372#[cfg_attr(feature = "ts", ts(export))]
17373pub struct HIL_STATE_QUATERNION_DATA {
17374    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17375    pub time_usec: u64,
17376    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17377    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17378    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17379    pub attitude_quaternion: [f32; 4],
17380    #[doc = "Body frame roll / phi angular speed"]
17381    pub rollspeed: f32,
17382    #[doc = "Body frame pitch / theta angular speed"]
17383    pub pitchspeed: f32,
17384    #[doc = "Body frame yaw / psi angular speed"]
17385    pub yawspeed: f32,
17386    #[doc = "Latitude"]
17387    pub lat: i32,
17388    #[doc = "Longitude"]
17389    pub lon: i32,
17390    #[doc = "Altitude"]
17391    pub alt: i32,
17392    #[doc = "Ground X Speed (Latitude)"]
17393    pub vx: i16,
17394    #[doc = "Ground Y Speed (Longitude)"]
17395    pub vy: i16,
17396    #[doc = "Ground Z Speed (Altitude)"]
17397    pub vz: i16,
17398    #[doc = "Indicated airspeed"]
17399    pub ind_airspeed: u16,
17400    #[doc = "True airspeed"]
17401    pub true_airspeed: u16,
17402    #[doc = "X acceleration"]
17403    pub xacc: i16,
17404    #[doc = "Y acceleration"]
17405    pub yacc: i16,
17406    #[doc = "Z acceleration"]
17407    pub zacc: i16,
17408}
17409impl HIL_STATE_QUATERNION_DATA {
17410    pub const ENCODED_LEN: usize = 64usize;
17411    pub const DEFAULT: Self = Self {
17412        time_usec: 0_u64,
17413        attitude_quaternion: [0.0_f32; 4usize],
17414        rollspeed: 0.0_f32,
17415        pitchspeed: 0.0_f32,
17416        yawspeed: 0.0_f32,
17417        lat: 0_i32,
17418        lon: 0_i32,
17419        alt: 0_i32,
17420        vx: 0_i16,
17421        vy: 0_i16,
17422        vz: 0_i16,
17423        ind_airspeed: 0_u16,
17424        true_airspeed: 0_u16,
17425        xacc: 0_i16,
17426        yacc: 0_i16,
17427        zacc: 0_i16,
17428    };
17429    #[cfg(feature = "arbitrary")]
17430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17431        use arbitrary::{Arbitrary, Unstructured};
17432        let mut buf = [0u8; 1024];
17433        rng.fill_bytes(&mut buf);
17434        let mut unstructured = Unstructured::new(&buf);
17435        Self::arbitrary(&mut unstructured).unwrap_or_default()
17436    }
17437}
17438impl Default for HIL_STATE_QUATERNION_DATA {
17439    fn default() -> Self {
17440        Self::DEFAULT.clone()
17441    }
17442}
17443impl MessageData for HIL_STATE_QUATERNION_DATA {
17444    type Message = MavMessage;
17445    const ID: u32 = 115u32;
17446    const NAME: &'static str = "HIL_STATE_QUATERNION";
17447    const EXTRA_CRC: u8 = 4u8;
17448    const ENCODED_LEN: usize = 64usize;
17449    fn deser(
17450        _version: MavlinkVersion,
17451        __input: &[u8],
17452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17453        let avail_len = __input.len();
17454        let mut payload_buf = [0; Self::ENCODED_LEN];
17455        let mut buf = if avail_len < Self::ENCODED_LEN {
17456            payload_buf[0..avail_len].copy_from_slice(__input);
17457            Bytes::new(&payload_buf)
17458        } else {
17459            Bytes::new(__input)
17460        };
17461        let mut __struct = Self::default();
17462        __struct.time_usec = buf.get_u64_le();
17463        for v in &mut __struct.attitude_quaternion {
17464            let val = buf.get_f32_le();
17465            *v = val;
17466        }
17467        __struct.rollspeed = buf.get_f32_le();
17468        __struct.pitchspeed = buf.get_f32_le();
17469        __struct.yawspeed = buf.get_f32_le();
17470        __struct.lat = buf.get_i32_le();
17471        __struct.lon = buf.get_i32_le();
17472        __struct.alt = buf.get_i32_le();
17473        __struct.vx = buf.get_i16_le();
17474        __struct.vy = buf.get_i16_le();
17475        __struct.vz = buf.get_i16_le();
17476        __struct.ind_airspeed = buf.get_u16_le();
17477        __struct.true_airspeed = buf.get_u16_le();
17478        __struct.xacc = buf.get_i16_le();
17479        __struct.yacc = buf.get_i16_le();
17480        __struct.zacc = buf.get_i16_le();
17481        Ok(__struct)
17482    }
17483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17484        let mut __tmp = BytesMut::new(bytes);
17485        #[allow(clippy::absurd_extreme_comparisons)]
17486        #[allow(unused_comparisons)]
17487        if __tmp.remaining() < Self::ENCODED_LEN {
17488            panic!(
17489                "buffer is too small (need {} bytes, but got {})",
17490                Self::ENCODED_LEN,
17491                __tmp.remaining(),
17492            )
17493        }
17494        __tmp.put_u64_le(self.time_usec);
17495        for val in &self.attitude_quaternion {
17496            __tmp.put_f32_le(*val);
17497        }
17498        __tmp.put_f32_le(self.rollspeed);
17499        __tmp.put_f32_le(self.pitchspeed);
17500        __tmp.put_f32_le(self.yawspeed);
17501        __tmp.put_i32_le(self.lat);
17502        __tmp.put_i32_le(self.lon);
17503        __tmp.put_i32_le(self.alt);
17504        __tmp.put_i16_le(self.vx);
17505        __tmp.put_i16_le(self.vy);
17506        __tmp.put_i16_le(self.vz);
17507        __tmp.put_u16_le(self.ind_airspeed);
17508        __tmp.put_u16_le(self.true_airspeed);
17509        __tmp.put_i16_le(self.xacc);
17510        __tmp.put_i16_le(self.yacc);
17511        __tmp.put_i16_le(self.zacc);
17512        if matches!(version, MavlinkVersion::V2) {
17513            let len = __tmp.len();
17514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17515        } else {
17516            __tmp.len()
17517        }
17518    }
17519}
17520#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17521#[doc = ""]
17522#[doc = "ID: 242"]
17523#[derive(Debug, Clone, PartialEq)]
17524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17526#[cfg_attr(feature = "ts", derive(TS))]
17527#[cfg_attr(feature = "ts", ts(export))]
17528pub struct HOME_POSITION_DATA {
17529    #[doc = "Latitude (WGS84)"]
17530    pub latitude: i32,
17531    #[doc = "Longitude (WGS84)"]
17532    pub longitude: i32,
17533    #[doc = "Altitude (MSL). Positive for up."]
17534    pub altitude: i32,
17535    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17536    pub x: f32,
17537    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17538    pub y: f32,
17539    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17540    pub z: f32,
17541    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17543    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17544    pub q: [f32; 4],
17545    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17546    pub approach_x: f32,
17547    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17548    pub approach_y: f32,
17549    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17550    pub approach_z: f32,
17551    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17552    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17553    pub time_usec: u64,
17554}
17555impl HOME_POSITION_DATA {
17556    pub const ENCODED_LEN: usize = 60usize;
17557    pub const DEFAULT: Self = Self {
17558        latitude: 0_i32,
17559        longitude: 0_i32,
17560        altitude: 0_i32,
17561        x: 0.0_f32,
17562        y: 0.0_f32,
17563        z: 0.0_f32,
17564        q: [0.0_f32; 4usize],
17565        approach_x: 0.0_f32,
17566        approach_y: 0.0_f32,
17567        approach_z: 0.0_f32,
17568        time_usec: 0_u64,
17569    };
17570    #[cfg(feature = "arbitrary")]
17571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17572        use arbitrary::{Arbitrary, Unstructured};
17573        let mut buf = [0u8; 1024];
17574        rng.fill_bytes(&mut buf);
17575        let mut unstructured = Unstructured::new(&buf);
17576        Self::arbitrary(&mut unstructured).unwrap_or_default()
17577    }
17578}
17579impl Default for HOME_POSITION_DATA {
17580    fn default() -> Self {
17581        Self::DEFAULT.clone()
17582    }
17583}
17584impl MessageData for HOME_POSITION_DATA {
17585    type Message = MavMessage;
17586    const ID: u32 = 242u32;
17587    const NAME: &'static str = "HOME_POSITION";
17588    const EXTRA_CRC: u8 = 104u8;
17589    const ENCODED_LEN: usize = 60usize;
17590    fn deser(
17591        _version: MavlinkVersion,
17592        __input: &[u8],
17593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17594        let avail_len = __input.len();
17595        let mut payload_buf = [0; Self::ENCODED_LEN];
17596        let mut buf = if avail_len < Self::ENCODED_LEN {
17597            payload_buf[0..avail_len].copy_from_slice(__input);
17598            Bytes::new(&payload_buf)
17599        } else {
17600            Bytes::new(__input)
17601        };
17602        let mut __struct = Self::default();
17603        __struct.latitude = buf.get_i32_le();
17604        __struct.longitude = buf.get_i32_le();
17605        __struct.altitude = buf.get_i32_le();
17606        __struct.x = buf.get_f32_le();
17607        __struct.y = buf.get_f32_le();
17608        __struct.z = buf.get_f32_le();
17609        for v in &mut __struct.q {
17610            let val = buf.get_f32_le();
17611            *v = val;
17612        }
17613        __struct.approach_x = buf.get_f32_le();
17614        __struct.approach_y = buf.get_f32_le();
17615        __struct.approach_z = buf.get_f32_le();
17616        __struct.time_usec = buf.get_u64_le();
17617        Ok(__struct)
17618    }
17619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17620        let mut __tmp = BytesMut::new(bytes);
17621        #[allow(clippy::absurd_extreme_comparisons)]
17622        #[allow(unused_comparisons)]
17623        if __tmp.remaining() < Self::ENCODED_LEN {
17624            panic!(
17625                "buffer is too small (need {} bytes, but got {})",
17626                Self::ENCODED_LEN,
17627                __tmp.remaining(),
17628            )
17629        }
17630        __tmp.put_i32_le(self.latitude);
17631        __tmp.put_i32_le(self.longitude);
17632        __tmp.put_i32_le(self.altitude);
17633        __tmp.put_f32_le(self.x);
17634        __tmp.put_f32_le(self.y);
17635        __tmp.put_f32_le(self.z);
17636        for val in &self.q {
17637            __tmp.put_f32_le(*val);
17638        }
17639        __tmp.put_f32_le(self.approach_x);
17640        __tmp.put_f32_le(self.approach_y);
17641        __tmp.put_f32_le(self.approach_z);
17642        if matches!(version, MavlinkVersion::V2) {
17643            __tmp.put_u64_le(self.time_usec);
17644            let len = __tmp.len();
17645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17646        } else {
17647            __tmp.len()
17648        }
17649    }
17650}
17651#[doc = "Temperature and humidity from hygrometer."]
17652#[doc = ""]
17653#[doc = "ID: 12920"]
17654#[derive(Debug, Clone, PartialEq)]
17655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17657#[cfg_attr(feature = "ts", derive(TS))]
17658#[cfg_attr(feature = "ts", ts(export))]
17659pub struct HYGROMETER_SENSOR_DATA {
17660    #[doc = "Temperature"]
17661    pub temperature: i16,
17662    #[doc = "Humidity"]
17663    pub humidity: u16,
17664    #[doc = "Hygrometer ID"]
17665    pub id: u8,
17666}
17667impl HYGROMETER_SENSOR_DATA {
17668    pub const ENCODED_LEN: usize = 5usize;
17669    pub const DEFAULT: Self = Self {
17670        temperature: 0_i16,
17671        humidity: 0_u16,
17672        id: 0_u8,
17673    };
17674    #[cfg(feature = "arbitrary")]
17675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17676        use arbitrary::{Arbitrary, Unstructured};
17677        let mut buf = [0u8; 1024];
17678        rng.fill_bytes(&mut buf);
17679        let mut unstructured = Unstructured::new(&buf);
17680        Self::arbitrary(&mut unstructured).unwrap_or_default()
17681    }
17682}
17683impl Default for HYGROMETER_SENSOR_DATA {
17684    fn default() -> Self {
17685        Self::DEFAULT.clone()
17686    }
17687}
17688impl MessageData for HYGROMETER_SENSOR_DATA {
17689    type Message = MavMessage;
17690    const ID: u32 = 12920u32;
17691    const NAME: &'static str = "HYGROMETER_SENSOR";
17692    const EXTRA_CRC: u8 = 20u8;
17693    const ENCODED_LEN: usize = 5usize;
17694    fn deser(
17695        _version: MavlinkVersion,
17696        __input: &[u8],
17697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17698        let avail_len = __input.len();
17699        let mut payload_buf = [0; Self::ENCODED_LEN];
17700        let mut buf = if avail_len < Self::ENCODED_LEN {
17701            payload_buf[0..avail_len].copy_from_slice(__input);
17702            Bytes::new(&payload_buf)
17703        } else {
17704            Bytes::new(__input)
17705        };
17706        let mut __struct = Self::default();
17707        __struct.temperature = buf.get_i16_le();
17708        __struct.humidity = buf.get_u16_le();
17709        __struct.id = buf.get_u8();
17710        Ok(__struct)
17711    }
17712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17713        let mut __tmp = BytesMut::new(bytes);
17714        #[allow(clippy::absurd_extreme_comparisons)]
17715        #[allow(unused_comparisons)]
17716        if __tmp.remaining() < Self::ENCODED_LEN {
17717            panic!(
17718                "buffer is too small (need {} bytes, but got {})",
17719                Self::ENCODED_LEN,
17720                __tmp.remaining(),
17721            )
17722        }
17723        __tmp.put_i16_le(self.temperature);
17724        __tmp.put_u16_le(self.humidity);
17725        __tmp.put_u8(self.id);
17726        if matches!(version, MavlinkVersion::V2) {
17727            let len = __tmp.len();
17728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17729        } else {
17730            __tmp.len()
17731        }
17732    }
17733}
17734#[doc = "Illuminator status."]
17735#[doc = ""]
17736#[doc = "ID: 440"]
17737#[derive(Debug, Clone, PartialEq)]
17738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17740#[cfg_attr(feature = "ts", derive(TS))]
17741#[cfg_attr(feature = "ts", ts(export))]
17742pub struct ILLUMINATOR_STATUS_DATA {
17743    #[doc = "Time since the start-up of the illuminator in ms"]
17744    pub uptime_ms: u32,
17745    #[doc = "Errors"]
17746    pub error_status: IlluminatorErrorFlags,
17747    #[doc = "Illuminator brightness"]
17748    pub brightness: f32,
17749    #[doc = "Illuminator strobing period in seconds"]
17750    pub strobe_period: f32,
17751    #[doc = "Illuminator strobing duty cycle"]
17752    pub strobe_duty_cycle: f32,
17753    #[doc = "Temperature in Celsius"]
17754    pub temp_c: f32,
17755    #[doc = "Minimum strobing period in seconds"]
17756    pub min_strobe_period: f32,
17757    #[doc = "Maximum strobing period in seconds"]
17758    pub max_strobe_period: f32,
17759    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17760    pub enable: u8,
17761    #[doc = "Supported illuminator modes"]
17762    pub mode_bitmask: IlluminatorMode,
17763    #[doc = "Illuminator mode"]
17764    pub mode: IlluminatorMode,
17765}
17766impl ILLUMINATOR_STATUS_DATA {
17767    pub const ENCODED_LEN: usize = 35usize;
17768    pub const DEFAULT: Self = Self {
17769        uptime_ms: 0_u32,
17770        error_status: IlluminatorErrorFlags::DEFAULT,
17771        brightness: 0.0_f32,
17772        strobe_period: 0.0_f32,
17773        strobe_duty_cycle: 0.0_f32,
17774        temp_c: 0.0_f32,
17775        min_strobe_period: 0.0_f32,
17776        max_strobe_period: 0.0_f32,
17777        enable: 0_u8,
17778        mode_bitmask: IlluminatorMode::DEFAULT,
17779        mode: IlluminatorMode::DEFAULT,
17780    };
17781    #[cfg(feature = "arbitrary")]
17782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17783        use arbitrary::{Arbitrary, Unstructured};
17784        let mut buf = [0u8; 1024];
17785        rng.fill_bytes(&mut buf);
17786        let mut unstructured = Unstructured::new(&buf);
17787        Self::arbitrary(&mut unstructured).unwrap_or_default()
17788    }
17789}
17790impl Default for ILLUMINATOR_STATUS_DATA {
17791    fn default() -> Self {
17792        Self::DEFAULT.clone()
17793    }
17794}
17795impl MessageData for ILLUMINATOR_STATUS_DATA {
17796    type Message = MavMessage;
17797    const ID: u32 = 440u32;
17798    const NAME: &'static str = "ILLUMINATOR_STATUS";
17799    const EXTRA_CRC: u8 = 66u8;
17800    const ENCODED_LEN: usize = 35usize;
17801    fn deser(
17802        _version: MavlinkVersion,
17803        __input: &[u8],
17804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17805        let avail_len = __input.len();
17806        let mut payload_buf = [0; Self::ENCODED_LEN];
17807        let mut buf = if avail_len < Self::ENCODED_LEN {
17808            payload_buf[0..avail_len].copy_from_slice(__input);
17809            Bytes::new(&payload_buf)
17810        } else {
17811            Bytes::new(__input)
17812        };
17813        let mut __struct = Self::default();
17814        __struct.uptime_ms = buf.get_u32_le();
17815        let tmp = buf.get_u32_le();
17816        __struct.error_status = IlluminatorErrorFlags::from_bits(tmp).ok_or(
17817            ::mavlink_core::error::ParserError::InvalidFlag {
17818                flag_type: "IlluminatorErrorFlags",
17819                value: tmp as u64,
17820            },
17821        )?;
17822        __struct.brightness = buf.get_f32_le();
17823        __struct.strobe_period = buf.get_f32_le();
17824        __struct.strobe_duty_cycle = buf.get_f32_le();
17825        __struct.temp_c = buf.get_f32_le();
17826        __struct.min_strobe_period = buf.get_f32_le();
17827        __struct.max_strobe_period = buf.get_f32_le();
17828        __struct.enable = buf.get_u8();
17829        let tmp = buf.get_u8();
17830        __struct.mode_bitmask =
17831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17832                enum_type: "IlluminatorMode",
17833                value: tmp as u64,
17834            })?;
17835        let tmp = buf.get_u8();
17836        __struct.mode =
17837            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17838                enum_type: "IlluminatorMode",
17839                value: tmp as u64,
17840            })?;
17841        Ok(__struct)
17842    }
17843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17844        let mut __tmp = BytesMut::new(bytes);
17845        #[allow(clippy::absurd_extreme_comparisons)]
17846        #[allow(unused_comparisons)]
17847        if __tmp.remaining() < Self::ENCODED_LEN {
17848            panic!(
17849                "buffer is too small (need {} bytes, but got {})",
17850                Self::ENCODED_LEN,
17851                __tmp.remaining(),
17852            )
17853        }
17854        __tmp.put_u32_le(self.uptime_ms);
17855        __tmp.put_u32_le(self.error_status.bits());
17856        __tmp.put_f32_le(self.brightness);
17857        __tmp.put_f32_le(self.strobe_period);
17858        __tmp.put_f32_le(self.strobe_duty_cycle);
17859        __tmp.put_f32_le(self.temp_c);
17860        __tmp.put_f32_le(self.min_strobe_period);
17861        __tmp.put_f32_le(self.max_strobe_period);
17862        __tmp.put_u8(self.enable);
17863        __tmp.put_u8(self.mode_bitmask as u8);
17864        __tmp.put_u8(self.mode as u8);
17865        if matches!(version, MavlinkVersion::V2) {
17866            let len = __tmp.len();
17867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17868        } else {
17869            __tmp.len()
17870        }
17871    }
17872}
17873#[doc = "Status of the Iridium SBD link."]
17874#[doc = ""]
17875#[doc = "ID: 335"]
17876#[derive(Debug, Clone, PartialEq)]
17877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17879#[cfg_attr(feature = "ts", derive(TS))]
17880#[cfg_attr(feature = "ts", ts(export))]
17881pub struct ISBD_LINK_STATUS_DATA {
17882    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17883    pub timestamp: u64,
17884    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17885    pub last_heartbeat: u64,
17886    #[doc = "Number of failed SBD sessions."]
17887    pub failed_sessions: u16,
17888    #[doc = "Number of successful SBD sessions."]
17889    pub successful_sessions: u16,
17890    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17891    pub signal_quality: u8,
17892    #[doc = "1: Ring call pending, 0: No call pending."]
17893    pub ring_pending: u8,
17894    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17895    pub tx_session_pending: u8,
17896    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17897    pub rx_session_pending: u8,
17898}
17899impl ISBD_LINK_STATUS_DATA {
17900    pub const ENCODED_LEN: usize = 24usize;
17901    pub const DEFAULT: Self = Self {
17902        timestamp: 0_u64,
17903        last_heartbeat: 0_u64,
17904        failed_sessions: 0_u16,
17905        successful_sessions: 0_u16,
17906        signal_quality: 0_u8,
17907        ring_pending: 0_u8,
17908        tx_session_pending: 0_u8,
17909        rx_session_pending: 0_u8,
17910    };
17911    #[cfg(feature = "arbitrary")]
17912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17913        use arbitrary::{Arbitrary, Unstructured};
17914        let mut buf = [0u8; 1024];
17915        rng.fill_bytes(&mut buf);
17916        let mut unstructured = Unstructured::new(&buf);
17917        Self::arbitrary(&mut unstructured).unwrap_or_default()
17918    }
17919}
17920impl Default for ISBD_LINK_STATUS_DATA {
17921    fn default() -> Self {
17922        Self::DEFAULT.clone()
17923    }
17924}
17925impl MessageData for ISBD_LINK_STATUS_DATA {
17926    type Message = MavMessage;
17927    const ID: u32 = 335u32;
17928    const NAME: &'static str = "ISBD_LINK_STATUS";
17929    const EXTRA_CRC: u8 = 225u8;
17930    const ENCODED_LEN: usize = 24usize;
17931    fn deser(
17932        _version: MavlinkVersion,
17933        __input: &[u8],
17934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17935        let avail_len = __input.len();
17936        let mut payload_buf = [0; Self::ENCODED_LEN];
17937        let mut buf = if avail_len < Self::ENCODED_LEN {
17938            payload_buf[0..avail_len].copy_from_slice(__input);
17939            Bytes::new(&payload_buf)
17940        } else {
17941            Bytes::new(__input)
17942        };
17943        let mut __struct = Self::default();
17944        __struct.timestamp = buf.get_u64_le();
17945        __struct.last_heartbeat = buf.get_u64_le();
17946        __struct.failed_sessions = buf.get_u16_le();
17947        __struct.successful_sessions = buf.get_u16_le();
17948        __struct.signal_quality = buf.get_u8();
17949        __struct.ring_pending = buf.get_u8();
17950        __struct.tx_session_pending = buf.get_u8();
17951        __struct.rx_session_pending = buf.get_u8();
17952        Ok(__struct)
17953    }
17954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17955        let mut __tmp = BytesMut::new(bytes);
17956        #[allow(clippy::absurd_extreme_comparisons)]
17957        #[allow(unused_comparisons)]
17958        if __tmp.remaining() < Self::ENCODED_LEN {
17959            panic!(
17960                "buffer is too small (need {} bytes, but got {})",
17961                Self::ENCODED_LEN,
17962                __tmp.remaining(),
17963            )
17964        }
17965        __tmp.put_u64_le(self.timestamp);
17966        __tmp.put_u64_le(self.last_heartbeat);
17967        __tmp.put_u16_le(self.failed_sessions);
17968        __tmp.put_u16_le(self.successful_sessions);
17969        __tmp.put_u8(self.signal_quality);
17970        __tmp.put_u8(self.ring_pending);
17971        __tmp.put_u8(self.tx_session_pending);
17972        __tmp.put_u8(self.rx_session_pending);
17973        if matches!(version, MavlinkVersion::V2) {
17974            let len = __tmp.len();
17975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17976        } else {
17977            __tmp.len()
17978        }
17979    }
17980}
17981#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17982#[doc = ""]
17983#[doc = "ID: 149"]
17984#[derive(Debug, Clone, PartialEq)]
17985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17987#[cfg_attr(feature = "ts", derive(TS))]
17988#[cfg_attr(feature = "ts", ts(export))]
17989pub struct LANDING_TARGET_DATA {
17990    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17991    pub time_usec: u64,
17992    #[doc = "X-axis angular offset of the target from the center of the image"]
17993    pub angle_x: f32,
17994    #[doc = "Y-axis angular offset of the target from the center of the image"]
17995    pub angle_y: f32,
17996    #[doc = "Distance to the target from the vehicle"]
17997    pub distance: f32,
17998    #[doc = "Size of target along x-axis"]
17999    pub size_x: f32,
18000    #[doc = "Size of target along y-axis"]
18001    pub size_y: f32,
18002    #[doc = "The ID of the target if multiple targets are present"]
18003    pub target_num: u8,
18004    #[doc = "Coordinate frame used for following fields."]
18005    pub frame: MavFrame,
18006    #[doc = "X Position of the landing target in MAV_FRAME"]
18007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18008    pub x: f32,
18009    #[doc = "Y Position of the landing target in MAV_FRAME"]
18010    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18011    pub y: f32,
18012    #[doc = "Z Position of the landing target in MAV_FRAME"]
18013    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18014    pub z: f32,
18015    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18018    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18019    pub q: [f32; 4],
18020    #[doc = "Type of landing target"]
18021    #[cfg_attr(feature = "serde", serde(default))]
18022    pub mavtype: LandingTargetType,
18023    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18024    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18025    pub position_valid: u8,
18026}
18027impl LANDING_TARGET_DATA {
18028    pub const ENCODED_LEN: usize = 60usize;
18029    pub const DEFAULT: Self = Self {
18030        time_usec: 0_u64,
18031        angle_x: 0.0_f32,
18032        angle_y: 0.0_f32,
18033        distance: 0.0_f32,
18034        size_x: 0.0_f32,
18035        size_y: 0.0_f32,
18036        target_num: 0_u8,
18037        frame: MavFrame::DEFAULT,
18038        x: 0.0_f32,
18039        y: 0.0_f32,
18040        z: 0.0_f32,
18041        q: [0.0_f32; 4usize],
18042        mavtype: LandingTargetType::DEFAULT,
18043        position_valid: 0_u8,
18044    };
18045    #[cfg(feature = "arbitrary")]
18046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18047        use arbitrary::{Arbitrary, Unstructured};
18048        let mut buf = [0u8; 1024];
18049        rng.fill_bytes(&mut buf);
18050        let mut unstructured = Unstructured::new(&buf);
18051        Self::arbitrary(&mut unstructured).unwrap_or_default()
18052    }
18053}
18054impl Default for LANDING_TARGET_DATA {
18055    fn default() -> Self {
18056        Self::DEFAULT.clone()
18057    }
18058}
18059impl MessageData for LANDING_TARGET_DATA {
18060    type Message = MavMessage;
18061    const ID: u32 = 149u32;
18062    const NAME: &'static str = "LANDING_TARGET";
18063    const EXTRA_CRC: u8 = 200u8;
18064    const ENCODED_LEN: usize = 60usize;
18065    fn deser(
18066        _version: MavlinkVersion,
18067        __input: &[u8],
18068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18069        let avail_len = __input.len();
18070        let mut payload_buf = [0; Self::ENCODED_LEN];
18071        let mut buf = if avail_len < Self::ENCODED_LEN {
18072            payload_buf[0..avail_len].copy_from_slice(__input);
18073            Bytes::new(&payload_buf)
18074        } else {
18075            Bytes::new(__input)
18076        };
18077        let mut __struct = Self::default();
18078        __struct.time_usec = buf.get_u64_le();
18079        __struct.angle_x = buf.get_f32_le();
18080        __struct.angle_y = buf.get_f32_le();
18081        __struct.distance = buf.get_f32_le();
18082        __struct.size_x = buf.get_f32_le();
18083        __struct.size_y = buf.get_f32_le();
18084        __struct.target_num = buf.get_u8();
18085        let tmp = buf.get_u8();
18086        __struct.frame =
18087            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18088                enum_type: "MavFrame",
18089                value: tmp as u64,
18090            })?;
18091        __struct.x = buf.get_f32_le();
18092        __struct.y = buf.get_f32_le();
18093        __struct.z = buf.get_f32_le();
18094        for v in &mut __struct.q {
18095            let val = buf.get_f32_le();
18096            *v = val;
18097        }
18098        let tmp = buf.get_u8();
18099        __struct.mavtype =
18100            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18101                enum_type: "LandingTargetType",
18102                value: tmp as u64,
18103            })?;
18104        __struct.position_valid = buf.get_u8();
18105        Ok(__struct)
18106    }
18107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18108        let mut __tmp = BytesMut::new(bytes);
18109        #[allow(clippy::absurd_extreme_comparisons)]
18110        #[allow(unused_comparisons)]
18111        if __tmp.remaining() < Self::ENCODED_LEN {
18112            panic!(
18113                "buffer is too small (need {} bytes, but got {})",
18114                Self::ENCODED_LEN,
18115                __tmp.remaining(),
18116            )
18117        }
18118        __tmp.put_u64_le(self.time_usec);
18119        __tmp.put_f32_le(self.angle_x);
18120        __tmp.put_f32_le(self.angle_y);
18121        __tmp.put_f32_le(self.distance);
18122        __tmp.put_f32_le(self.size_x);
18123        __tmp.put_f32_le(self.size_y);
18124        __tmp.put_u8(self.target_num);
18125        __tmp.put_u8(self.frame as u8);
18126        if matches!(version, MavlinkVersion::V2) {
18127            __tmp.put_f32_le(self.x);
18128            __tmp.put_f32_le(self.y);
18129            __tmp.put_f32_le(self.z);
18130            for val in &self.q {
18131                __tmp.put_f32_le(*val);
18132            }
18133            __tmp.put_u8(self.mavtype as u8);
18134            __tmp.put_u8(self.position_valid);
18135            let len = __tmp.len();
18136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18137        } else {
18138            __tmp.len()
18139        }
18140    }
18141}
18142#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18143#[doc = ""]
18144#[doc = "ID: 8"]
18145#[derive(Debug, Clone, PartialEq)]
18146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18148#[cfg_attr(feature = "ts", derive(TS))]
18149#[cfg_attr(feature = "ts", ts(export))]
18150pub struct LINK_NODE_STATUS_DATA {
18151    #[doc = "Timestamp (time since system boot)."]
18152    pub timestamp: u64,
18153    #[doc = "Transmit rate"]
18154    pub tx_rate: u32,
18155    #[doc = "Receive rate"]
18156    pub rx_rate: u32,
18157    #[doc = "Messages sent"]
18158    pub messages_sent: u32,
18159    #[doc = "Messages received (estimated from counting seq)"]
18160    pub messages_received: u32,
18161    #[doc = "Messages lost (estimated from counting seq)"]
18162    pub messages_lost: u32,
18163    #[doc = "Number of bytes that could not be parsed correctly."]
18164    pub rx_parse_err: u16,
18165    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18166    pub tx_overflows: u16,
18167    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18168    pub rx_overflows: u16,
18169    #[doc = "Remaining free transmit buffer space"]
18170    pub tx_buf: u8,
18171    #[doc = "Remaining free receive buffer space"]
18172    pub rx_buf: u8,
18173}
18174impl LINK_NODE_STATUS_DATA {
18175    pub const ENCODED_LEN: usize = 36usize;
18176    pub const DEFAULT: Self = Self {
18177        timestamp: 0_u64,
18178        tx_rate: 0_u32,
18179        rx_rate: 0_u32,
18180        messages_sent: 0_u32,
18181        messages_received: 0_u32,
18182        messages_lost: 0_u32,
18183        rx_parse_err: 0_u16,
18184        tx_overflows: 0_u16,
18185        rx_overflows: 0_u16,
18186        tx_buf: 0_u8,
18187        rx_buf: 0_u8,
18188    };
18189    #[cfg(feature = "arbitrary")]
18190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18191        use arbitrary::{Arbitrary, Unstructured};
18192        let mut buf = [0u8; 1024];
18193        rng.fill_bytes(&mut buf);
18194        let mut unstructured = Unstructured::new(&buf);
18195        Self::arbitrary(&mut unstructured).unwrap_or_default()
18196    }
18197}
18198impl Default for LINK_NODE_STATUS_DATA {
18199    fn default() -> Self {
18200        Self::DEFAULT.clone()
18201    }
18202}
18203impl MessageData for LINK_NODE_STATUS_DATA {
18204    type Message = MavMessage;
18205    const ID: u32 = 8u32;
18206    const NAME: &'static str = "LINK_NODE_STATUS";
18207    const EXTRA_CRC: u8 = 117u8;
18208    const ENCODED_LEN: usize = 36usize;
18209    fn deser(
18210        _version: MavlinkVersion,
18211        __input: &[u8],
18212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18213        let avail_len = __input.len();
18214        let mut payload_buf = [0; Self::ENCODED_LEN];
18215        let mut buf = if avail_len < Self::ENCODED_LEN {
18216            payload_buf[0..avail_len].copy_from_slice(__input);
18217            Bytes::new(&payload_buf)
18218        } else {
18219            Bytes::new(__input)
18220        };
18221        let mut __struct = Self::default();
18222        __struct.timestamp = buf.get_u64_le();
18223        __struct.tx_rate = buf.get_u32_le();
18224        __struct.rx_rate = buf.get_u32_le();
18225        __struct.messages_sent = buf.get_u32_le();
18226        __struct.messages_received = buf.get_u32_le();
18227        __struct.messages_lost = buf.get_u32_le();
18228        __struct.rx_parse_err = buf.get_u16_le();
18229        __struct.tx_overflows = buf.get_u16_le();
18230        __struct.rx_overflows = buf.get_u16_le();
18231        __struct.tx_buf = buf.get_u8();
18232        __struct.rx_buf = buf.get_u8();
18233        Ok(__struct)
18234    }
18235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18236        let mut __tmp = BytesMut::new(bytes);
18237        #[allow(clippy::absurd_extreme_comparisons)]
18238        #[allow(unused_comparisons)]
18239        if __tmp.remaining() < Self::ENCODED_LEN {
18240            panic!(
18241                "buffer is too small (need {} bytes, but got {})",
18242                Self::ENCODED_LEN,
18243                __tmp.remaining(),
18244            )
18245        }
18246        __tmp.put_u64_le(self.timestamp);
18247        __tmp.put_u32_le(self.tx_rate);
18248        __tmp.put_u32_le(self.rx_rate);
18249        __tmp.put_u32_le(self.messages_sent);
18250        __tmp.put_u32_le(self.messages_received);
18251        __tmp.put_u32_le(self.messages_lost);
18252        __tmp.put_u16_le(self.rx_parse_err);
18253        __tmp.put_u16_le(self.tx_overflows);
18254        __tmp.put_u16_le(self.rx_overflows);
18255        __tmp.put_u8(self.tx_buf);
18256        __tmp.put_u8(self.rx_buf);
18257        if matches!(version, MavlinkVersion::V2) {
18258            let len = __tmp.len();
18259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18260        } else {
18261            __tmp.len()
18262        }
18263    }
18264}
18265#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18266#[doc = ""]
18267#[doc = "ID: 32"]
18268#[derive(Debug, Clone, PartialEq)]
18269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18271#[cfg_attr(feature = "ts", derive(TS))]
18272#[cfg_attr(feature = "ts", ts(export))]
18273pub struct LOCAL_POSITION_NED_DATA {
18274    #[doc = "Timestamp (time since system boot)."]
18275    pub time_boot_ms: u32,
18276    #[doc = "X Position"]
18277    pub x: f32,
18278    #[doc = "Y Position"]
18279    pub y: f32,
18280    #[doc = "Z Position"]
18281    pub z: f32,
18282    #[doc = "X Speed"]
18283    pub vx: f32,
18284    #[doc = "Y Speed"]
18285    pub vy: f32,
18286    #[doc = "Z Speed"]
18287    pub vz: f32,
18288}
18289impl LOCAL_POSITION_NED_DATA {
18290    pub const ENCODED_LEN: usize = 28usize;
18291    pub const DEFAULT: Self = Self {
18292        time_boot_ms: 0_u32,
18293        x: 0.0_f32,
18294        y: 0.0_f32,
18295        z: 0.0_f32,
18296        vx: 0.0_f32,
18297        vy: 0.0_f32,
18298        vz: 0.0_f32,
18299    };
18300    #[cfg(feature = "arbitrary")]
18301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18302        use arbitrary::{Arbitrary, Unstructured};
18303        let mut buf = [0u8; 1024];
18304        rng.fill_bytes(&mut buf);
18305        let mut unstructured = Unstructured::new(&buf);
18306        Self::arbitrary(&mut unstructured).unwrap_or_default()
18307    }
18308}
18309impl Default for LOCAL_POSITION_NED_DATA {
18310    fn default() -> Self {
18311        Self::DEFAULT.clone()
18312    }
18313}
18314impl MessageData for LOCAL_POSITION_NED_DATA {
18315    type Message = MavMessage;
18316    const ID: u32 = 32u32;
18317    const NAME: &'static str = "LOCAL_POSITION_NED";
18318    const EXTRA_CRC: u8 = 185u8;
18319    const ENCODED_LEN: usize = 28usize;
18320    fn deser(
18321        _version: MavlinkVersion,
18322        __input: &[u8],
18323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18324        let avail_len = __input.len();
18325        let mut payload_buf = [0; Self::ENCODED_LEN];
18326        let mut buf = if avail_len < Self::ENCODED_LEN {
18327            payload_buf[0..avail_len].copy_from_slice(__input);
18328            Bytes::new(&payload_buf)
18329        } else {
18330            Bytes::new(__input)
18331        };
18332        let mut __struct = Self::default();
18333        __struct.time_boot_ms = buf.get_u32_le();
18334        __struct.x = buf.get_f32_le();
18335        __struct.y = buf.get_f32_le();
18336        __struct.z = buf.get_f32_le();
18337        __struct.vx = buf.get_f32_le();
18338        __struct.vy = buf.get_f32_le();
18339        __struct.vz = buf.get_f32_le();
18340        Ok(__struct)
18341    }
18342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18343        let mut __tmp = BytesMut::new(bytes);
18344        #[allow(clippy::absurd_extreme_comparisons)]
18345        #[allow(unused_comparisons)]
18346        if __tmp.remaining() < Self::ENCODED_LEN {
18347            panic!(
18348                "buffer is too small (need {} bytes, but got {})",
18349                Self::ENCODED_LEN,
18350                __tmp.remaining(),
18351            )
18352        }
18353        __tmp.put_u32_le(self.time_boot_ms);
18354        __tmp.put_f32_le(self.x);
18355        __tmp.put_f32_le(self.y);
18356        __tmp.put_f32_le(self.z);
18357        __tmp.put_f32_le(self.vx);
18358        __tmp.put_f32_le(self.vy);
18359        __tmp.put_f32_le(self.vz);
18360        if matches!(version, MavlinkVersion::V2) {
18361            let len = __tmp.len();
18362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18363        } else {
18364            __tmp.len()
18365        }
18366    }
18367}
18368#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18369#[doc = ""]
18370#[doc = "ID: 64"]
18371#[derive(Debug, Clone, PartialEq)]
18372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18374#[cfg_attr(feature = "ts", derive(TS))]
18375#[cfg_attr(feature = "ts", ts(export))]
18376pub struct LOCAL_POSITION_NED_COV_DATA {
18377    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18378    pub time_usec: u64,
18379    #[doc = "X Position"]
18380    pub x: f32,
18381    #[doc = "Y Position"]
18382    pub y: f32,
18383    #[doc = "Z Position"]
18384    pub z: f32,
18385    #[doc = "X Speed"]
18386    pub vx: f32,
18387    #[doc = "Y Speed"]
18388    pub vy: f32,
18389    #[doc = "Z Speed"]
18390    pub vz: f32,
18391    #[doc = "X Acceleration"]
18392    pub ax: f32,
18393    #[doc = "Y Acceleration"]
18394    pub ay: f32,
18395    #[doc = "Z Acceleration"]
18396    pub az: f32,
18397    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18399    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18400    pub covariance: [f32; 45],
18401    #[doc = "Class id of the estimator this estimate originated from."]
18402    pub estimator_type: MavEstimatorType,
18403}
18404impl LOCAL_POSITION_NED_COV_DATA {
18405    pub const ENCODED_LEN: usize = 225usize;
18406    pub const DEFAULT: Self = Self {
18407        time_usec: 0_u64,
18408        x: 0.0_f32,
18409        y: 0.0_f32,
18410        z: 0.0_f32,
18411        vx: 0.0_f32,
18412        vy: 0.0_f32,
18413        vz: 0.0_f32,
18414        ax: 0.0_f32,
18415        ay: 0.0_f32,
18416        az: 0.0_f32,
18417        covariance: [0.0_f32; 45usize],
18418        estimator_type: MavEstimatorType::DEFAULT,
18419    };
18420    #[cfg(feature = "arbitrary")]
18421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18422        use arbitrary::{Arbitrary, Unstructured};
18423        let mut buf = [0u8; 1024];
18424        rng.fill_bytes(&mut buf);
18425        let mut unstructured = Unstructured::new(&buf);
18426        Self::arbitrary(&mut unstructured).unwrap_or_default()
18427    }
18428}
18429impl Default for LOCAL_POSITION_NED_COV_DATA {
18430    fn default() -> Self {
18431        Self::DEFAULT.clone()
18432    }
18433}
18434impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18435    type Message = MavMessage;
18436    const ID: u32 = 64u32;
18437    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18438    const EXTRA_CRC: u8 = 191u8;
18439    const ENCODED_LEN: usize = 225usize;
18440    fn deser(
18441        _version: MavlinkVersion,
18442        __input: &[u8],
18443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18444        let avail_len = __input.len();
18445        let mut payload_buf = [0; Self::ENCODED_LEN];
18446        let mut buf = if avail_len < Self::ENCODED_LEN {
18447            payload_buf[0..avail_len].copy_from_slice(__input);
18448            Bytes::new(&payload_buf)
18449        } else {
18450            Bytes::new(__input)
18451        };
18452        let mut __struct = Self::default();
18453        __struct.time_usec = buf.get_u64_le();
18454        __struct.x = buf.get_f32_le();
18455        __struct.y = buf.get_f32_le();
18456        __struct.z = buf.get_f32_le();
18457        __struct.vx = buf.get_f32_le();
18458        __struct.vy = buf.get_f32_le();
18459        __struct.vz = buf.get_f32_le();
18460        __struct.ax = buf.get_f32_le();
18461        __struct.ay = buf.get_f32_le();
18462        __struct.az = buf.get_f32_le();
18463        for v in &mut __struct.covariance {
18464            let val = buf.get_f32_le();
18465            *v = val;
18466        }
18467        let tmp = buf.get_u8();
18468        __struct.estimator_type =
18469            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18470                enum_type: "MavEstimatorType",
18471                value: tmp as u64,
18472            })?;
18473        Ok(__struct)
18474    }
18475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18476        let mut __tmp = BytesMut::new(bytes);
18477        #[allow(clippy::absurd_extreme_comparisons)]
18478        #[allow(unused_comparisons)]
18479        if __tmp.remaining() < Self::ENCODED_LEN {
18480            panic!(
18481                "buffer is too small (need {} bytes, but got {})",
18482                Self::ENCODED_LEN,
18483                __tmp.remaining(),
18484            )
18485        }
18486        __tmp.put_u64_le(self.time_usec);
18487        __tmp.put_f32_le(self.x);
18488        __tmp.put_f32_le(self.y);
18489        __tmp.put_f32_le(self.z);
18490        __tmp.put_f32_le(self.vx);
18491        __tmp.put_f32_le(self.vy);
18492        __tmp.put_f32_le(self.vz);
18493        __tmp.put_f32_le(self.ax);
18494        __tmp.put_f32_le(self.ay);
18495        __tmp.put_f32_le(self.az);
18496        for val in &self.covariance {
18497            __tmp.put_f32_le(*val);
18498        }
18499        __tmp.put_u8(self.estimator_type as u8);
18500        if matches!(version, MavlinkVersion::V2) {
18501            let len = __tmp.len();
18502            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18503        } else {
18504            __tmp.len()
18505        }
18506    }
18507}
18508#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18509#[doc = ""]
18510#[doc = "ID: 89"]
18511#[derive(Debug, Clone, PartialEq)]
18512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18514#[cfg_attr(feature = "ts", derive(TS))]
18515#[cfg_attr(feature = "ts", ts(export))]
18516pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18517    #[doc = "Timestamp (time since system boot)."]
18518    pub time_boot_ms: u32,
18519    #[doc = "X Position"]
18520    pub x: f32,
18521    #[doc = "Y Position"]
18522    pub y: f32,
18523    #[doc = "Z Position"]
18524    pub z: f32,
18525    #[doc = "Roll"]
18526    pub roll: f32,
18527    #[doc = "Pitch"]
18528    pub pitch: f32,
18529    #[doc = "Yaw"]
18530    pub yaw: f32,
18531}
18532impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18533    pub const ENCODED_LEN: usize = 28usize;
18534    pub const DEFAULT: Self = Self {
18535        time_boot_ms: 0_u32,
18536        x: 0.0_f32,
18537        y: 0.0_f32,
18538        z: 0.0_f32,
18539        roll: 0.0_f32,
18540        pitch: 0.0_f32,
18541        yaw: 0.0_f32,
18542    };
18543    #[cfg(feature = "arbitrary")]
18544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18545        use arbitrary::{Arbitrary, Unstructured};
18546        let mut buf = [0u8; 1024];
18547        rng.fill_bytes(&mut buf);
18548        let mut unstructured = Unstructured::new(&buf);
18549        Self::arbitrary(&mut unstructured).unwrap_or_default()
18550    }
18551}
18552impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18553    fn default() -> Self {
18554        Self::DEFAULT.clone()
18555    }
18556}
18557impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18558    type Message = MavMessage;
18559    const ID: u32 = 89u32;
18560    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18561    const EXTRA_CRC: u8 = 231u8;
18562    const ENCODED_LEN: usize = 28usize;
18563    fn deser(
18564        _version: MavlinkVersion,
18565        __input: &[u8],
18566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18567        let avail_len = __input.len();
18568        let mut payload_buf = [0; Self::ENCODED_LEN];
18569        let mut buf = if avail_len < Self::ENCODED_LEN {
18570            payload_buf[0..avail_len].copy_from_slice(__input);
18571            Bytes::new(&payload_buf)
18572        } else {
18573            Bytes::new(__input)
18574        };
18575        let mut __struct = Self::default();
18576        __struct.time_boot_ms = buf.get_u32_le();
18577        __struct.x = buf.get_f32_le();
18578        __struct.y = buf.get_f32_le();
18579        __struct.z = buf.get_f32_le();
18580        __struct.roll = buf.get_f32_le();
18581        __struct.pitch = buf.get_f32_le();
18582        __struct.yaw = buf.get_f32_le();
18583        Ok(__struct)
18584    }
18585    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18586        let mut __tmp = BytesMut::new(bytes);
18587        #[allow(clippy::absurd_extreme_comparisons)]
18588        #[allow(unused_comparisons)]
18589        if __tmp.remaining() < Self::ENCODED_LEN {
18590            panic!(
18591                "buffer is too small (need {} bytes, but got {})",
18592                Self::ENCODED_LEN,
18593                __tmp.remaining(),
18594            )
18595        }
18596        __tmp.put_u32_le(self.time_boot_ms);
18597        __tmp.put_f32_le(self.x);
18598        __tmp.put_f32_le(self.y);
18599        __tmp.put_f32_le(self.z);
18600        __tmp.put_f32_le(self.roll);
18601        __tmp.put_f32_le(self.pitch);
18602        __tmp.put_f32_le(self.yaw);
18603        if matches!(version, MavlinkVersion::V2) {
18604            let len = __tmp.len();
18605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18606        } else {
18607            __tmp.len()
18608        }
18609    }
18610}
18611#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18612#[doc = ""]
18613#[doc = "ID: 268"]
18614#[derive(Debug, Clone, PartialEq)]
18615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18617#[cfg_attr(feature = "ts", derive(TS))]
18618#[cfg_attr(feature = "ts", ts(export))]
18619pub struct LOGGING_ACK_DATA {
18620    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18621    pub sequence: u16,
18622    #[doc = "system ID of the target"]
18623    pub target_system: u8,
18624    #[doc = "component ID of the target"]
18625    pub target_component: u8,
18626}
18627impl LOGGING_ACK_DATA {
18628    pub const ENCODED_LEN: usize = 4usize;
18629    pub const DEFAULT: Self = Self {
18630        sequence: 0_u16,
18631        target_system: 0_u8,
18632        target_component: 0_u8,
18633    };
18634    #[cfg(feature = "arbitrary")]
18635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18636        use arbitrary::{Arbitrary, Unstructured};
18637        let mut buf = [0u8; 1024];
18638        rng.fill_bytes(&mut buf);
18639        let mut unstructured = Unstructured::new(&buf);
18640        Self::arbitrary(&mut unstructured).unwrap_or_default()
18641    }
18642}
18643impl Default for LOGGING_ACK_DATA {
18644    fn default() -> Self {
18645        Self::DEFAULT.clone()
18646    }
18647}
18648impl MessageData for LOGGING_ACK_DATA {
18649    type Message = MavMessage;
18650    const ID: u32 = 268u32;
18651    const NAME: &'static str = "LOGGING_ACK";
18652    const EXTRA_CRC: u8 = 14u8;
18653    const ENCODED_LEN: usize = 4usize;
18654    fn deser(
18655        _version: MavlinkVersion,
18656        __input: &[u8],
18657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18658        let avail_len = __input.len();
18659        let mut payload_buf = [0; Self::ENCODED_LEN];
18660        let mut buf = if avail_len < Self::ENCODED_LEN {
18661            payload_buf[0..avail_len].copy_from_slice(__input);
18662            Bytes::new(&payload_buf)
18663        } else {
18664            Bytes::new(__input)
18665        };
18666        let mut __struct = Self::default();
18667        __struct.sequence = buf.get_u16_le();
18668        __struct.target_system = buf.get_u8();
18669        __struct.target_component = buf.get_u8();
18670        Ok(__struct)
18671    }
18672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18673        let mut __tmp = BytesMut::new(bytes);
18674        #[allow(clippy::absurd_extreme_comparisons)]
18675        #[allow(unused_comparisons)]
18676        if __tmp.remaining() < Self::ENCODED_LEN {
18677            panic!(
18678                "buffer is too small (need {} bytes, but got {})",
18679                Self::ENCODED_LEN,
18680                __tmp.remaining(),
18681            )
18682        }
18683        __tmp.put_u16_le(self.sequence);
18684        __tmp.put_u8(self.target_system);
18685        __tmp.put_u8(self.target_component);
18686        if matches!(version, MavlinkVersion::V2) {
18687            let len = __tmp.len();
18688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18689        } else {
18690            __tmp.len()
18691        }
18692    }
18693}
18694#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18695#[doc = ""]
18696#[doc = "ID: 266"]
18697#[derive(Debug, Clone, PartialEq)]
18698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18700#[cfg_attr(feature = "ts", derive(TS))]
18701#[cfg_attr(feature = "ts", ts(export))]
18702pub struct LOGGING_DATA_DATA {
18703    #[doc = "sequence number (can wrap)"]
18704    pub sequence: u16,
18705    #[doc = "system ID of the target"]
18706    pub target_system: u8,
18707    #[doc = "component ID of the target"]
18708    pub target_component: u8,
18709    #[doc = "data length"]
18710    pub length: u8,
18711    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18712    pub first_message_offset: u8,
18713    #[doc = "logged data"]
18714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18715    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18716    pub data: [u8; 249],
18717}
18718impl LOGGING_DATA_DATA {
18719    pub const ENCODED_LEN: usize = 255usize;
18720    pub const DEFAULT: Self = Self {
18721        sequence: 0_u16,
18722        target_system: 0_u8,
18723        target_component: 0_u8,
18724        length: 0_u8,
18725        first_message_offset: 0_u8,
18726        data: [0_u8; 249usize],
18727    };
18728    #[cfg(feature = "arbitrary")]
18729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18730        use arbitrary::{Arbitrary, Unstructured};
18731        let mut buf = [0u8; 1024];
18732        rng.fill_bytes(&mut buf);
18733        let mut unstructured = Unstructured::new(&buf);
18734        Self::arbitrary(&mut unstructured).unwrap_or_default()
18735    }
18736}
18737impl Default for LOGGING_DATA_DATA {
18738    fn default() -> Self {
18739        Self::DEFAULT.clone()
18740    }
18741}
18742impl MessageData for LOGGING_DATA_DATA {
18743    type Message = MavMessage;
18744    const ID: u32 = 266u32;
18745    const NAME: &'static str = "LOGGING_DATA";
18746    const EXTRA_CRC: u8 = 193u8;
18747    const ENCODED_LEN: usize = 255usize;
18748    fn deser(
18749        _version: MavlinkVersion,
18750        __input: &[u8],
18751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18752        let avail_len = __input.len();
18753        let mut payload_buf = [0; Self::ENCODED_LEN];
18754        let mut buf = if avail_len < Self::ENCODED_LEN {
18755            payload_buf[0..avail_len].copy_from_slice(__input);
18756            Bytes::new(&payload_buf)
18757        } else {
18758            Bytes::new(__input)
18759        };
18760        let mut __struct = Self::default();
18761        __struct.sequence = buf.get_u16_le();
18762        __struct.target_system = buf.get_u8();
18763        __struct.target_component = buf.get_u8();
18764        __struct.length = buf.get_u8();
18765        __struct.first_message_offset = buf.get_u8();
18766        for v in &mut __struct.data {
18767            let val = buf.get_u8();
18768            *v = val;
18769        }
18770        Ok(__struct)
18771    }
18772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18773        let mut __tmp = BytesMut::new(bytes);
18774        #[allow(clippy::absurd_extreme_comparisons)]
18775        #[allow(unused_comparisons)]
18776        if __tmp.remaining() < Self::ENCODED_LEN {
18777            panic!(
18778                "buffer is too small (need {} bytes, but got {})",
18779                Self::ENCODED_LEN,
18780                __tmp.remaining(),
18781            )
18782        }
18783        __tmp.put_u16_le(self.sequence);
18784        __tmp.put_u8(self.target_system);
18785        __tmp.put_u8(self.target_component);
18786        __tmp.put_u8(self.length);
18787        __tmp.put_u8(self.first_message_offset);
18788        for val in &self.data {
18789            __tmp.put_u8(*val);
18790        }
18791        if matches!(version, MavlinkVersion::V2) {
18792            let len = __tmp.len();
18793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18794        } else {
18795            __tmp.len()
18796        }
18797    }
18798}
18799#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18800#[doc = ""]
18801#[doc = "ID: 267"]
18802#[derive(Debug, Clone, PartialEq)]
18803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18805#[cfg_attr(feature = "ts", derive(TS))]
18806#[cfg_attr(feature = "ts", ts(export))]
18807pub struct LOGGING_DATA_ACKED_DATA {
18808    #[doc = "sequence number (can wrap)"]
18809    pub sequence: u16,
18810    #[doc = "system ID of the target"]
18811    pub target_system: u8,
18812    #[doc = "component ID of the target"]
18813    pub target_component: u8,
18814    #[doc = "data length"]
18815    pub length: u8,
18816    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18817    pub first_message_offset: u8,
18818    #[doc = "logged data"]
18819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18820    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18821    pub data: [u8; 249],
18822}
18823impl LOGGING_DATA_ACKED_DATA {
18824    pub const ENCODED_LEN: usize = 255usize;
18825    pub const DEFAULT: Self = Self {
18826        sequence: 0_u16,
18827        target_system: 0_u8,
18828        target_component: 0_u8,
18829        length: 0_u8,
18830        first_message_offset: 0_u8,
18831        data: [0_u8; 249usize],
18832    };
18833    #[cfg(feature = "arbitrary")]
18834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18835        use arbitrary::{Arbitrary, Unstructured};
18836        let mut buf = [0u8; 1024];
18837        rng.fill_bytes(&mut buf);
18838        let mut unstructured = Unstructured::new(&buf);
18839        Self::arbitrary(&mut unstructured).unwrap_or_default()
18840    }
18841}
18842impl Default for LOGGING_DATA_ACKED_DATA {
18843    fn default() -> Self {
18844        Self::DEFAULT.clone()
18845    }
18846}
18847impl MessageData for LOGGING_DATA_ACKED_DATA {
18848    type Message = MavMessage;
18849    const ID: u32 = 267u32;
18850    const NAME: &'static str = "LOGGING_DATA_ACKED";
18851    const EXTRA_CRC: u8 = 35u8;
18852    const ENCODED_LEN: usize = 255usize;
18853    fn deser(
18854        _version: MavlinkVersion,
18855        __input: &[u8],
18856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18857        let avail_len = __input.len();
18858        let mut payload_buf = [0; Self::ENCODED_LEN];
18859        let mut buf = if avail_len < Self::ENCODED_LEN {
18860            payload_buf[0..avail_len].copy_from_slice(__input);
18861            Bytes::new(&payload_buf)
18862        } else {
18863            Bytes::new(__input)
18864        };
18865        let mut __struct = Self::default();
18866        __struct.sequence = buf.get_u16_le();
18867        __struct.target_system = buf.get_u8();
18868        __struct.target_component = buf.get_u8();
18869        __struct.length = buf.get_u8();
18870        __struct.first_message_offset = buf.get_u8();
18871        for v in &mut __struct.data {
18872            let val = buf.get_u8();
18873            *v = val;
18874        }
18875        Ok(__struct)
18876    }
18877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18878        let mut __tmp = BytesMut::new(bytes);
18879        #[allow(clippy::absurd_extreme_comparisons)]
18880        #[allow(unused_comparisons)]
18881        if __tmp.remaining() < Self::ENCODED_LEN {
18882            panic!(
18883                "buffer is too small (need {} bytes, but got {})",
18884                Self::ENCODED_LEN,
18885                __tmp.remaining(),
18886            )
18887        }
18888        __tmp.put_u16_le(self.sequence);
18889        __tmp.put_u8(self.target_system);
18890        __tmp.put_u8(self.target_component);
18891        __tmp.put_u8(self.length);
18892        __tmp.put_u8(self.first_message_offset);
18893        for val in &self.data {
18894            __tmp.put_u8(*val);
18895        }
18896        if matches!(version, MavlinkVersion::V2) {
18897            let len = __tmp.len();
18898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18899        } else {
18900            __tmp.len()
18901        }
18902    }
18903}
18904#[doc = "Reply to LOG_REQUEST_DATA."]
18905#[doc = ""]
18906#[doc = "ID: 120"]
18907#[derive(Debug, Clone, PartialEq)]
18908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18910#[cfg_attr(feature = "ts", derive(TS))]
18911#[cfg_attr(feature = "ts", ts(export))]
18912pub struct LOG_DATA_DATA {
18913    #[doc = "Offset into the log"]
18914    pub ofs: u32,
18915    #[doc = "Log id (from LOG_ENTRY reply)"]
18916    pub id: u16,
18917    #[doc = "Number of bytes (zero for end of log)"]
18918    pub count: u8,
18919    #[doc = "log data"]
18920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18922    pub data: [u8; 90],
18923}
18924impl LOG_DATA_DATA {
18925    pub const ENCODED_LEN: usize = 97usize;
18926    pub const DEFAULT: Self = Self {
18927        ofs: 0_u32,
18928        id: 0_u16,
18929        count: 0_u8,
18930        data: [0_u8; 90usize],
18931    };
18932    #[cfg(feature = "arbitrary")]
18933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18934        use arbitrary::{Arbitrary, Unstructured};
18935        let mut buf = [0u8; 1024];
18936        rng.fill_bytes(&mut buf);
18937        let mut unstructured = Unstructured::new(&buf);
18938        Self::arbitrary(&mut unstructured).unwrap_or_default()
18939    }
18940}
18941impl Default for LOG_DATA_DATA {
18942    fn default() -> Self {
18943        Self::DEFAULT.clone()
18944    }
18945}
18946impl MessageData for LOG_DATA_DATA {
18947    type Message = MavMessage;
18948    const ID: u32 = 120u32;
18949    const NAME: &'static str = "LOG_DATA";
18950    const EXTRA_CRC: u8 = 134u8;
18951    const ENCODED_LEN: usize = 97usize;
18952    fn deser(
18953        _version: MavlinkVersion,
18954        __input: &[u8],
18955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18956        let avail_len = __input.len();
18957        let mut payload_buf = [0; Self::ENCODED_LEN];
18958        let mut buf = if avail_len < Self::ENCODED_LEN {
18959            payload_buf[0..avail_len].copy_from_slice(__input);
18960            Bytes::new(&payload_buf)
18961        } else {
18962            Bytes::new(__input)
18963        };
18964        let mut __struct = Self::default();
18965        __struct.ofs = buf.get_u32_le();
18966        __struct.id = buf.get_u16_le();
18967        __struct.count = buf.get_u8();
18968        for v in &mut __struct.data {
18969            let val = buf.get_u8();
18970            *v = val;
18971        }
18972        Ok(__struct)
18973    }
18974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18975        let mut __tmp = BytesMut::new(bytes);
18976        #[allow(clippy::absurd_extreme_comparisons)]
18977        #[allow(unused_comparisons)]
18978        if __tmp.remaining() < Self::ENCODED_LEN {
18979            panic!(
18980                "buffer is too small (need {} bytes, but got {})",
18981                Self::ENCODED_LEN,
18982                __tmp.remaining(),
18983            )
18984        }
18985        __tmp.put_u32_le(self.ofs);
18986        __tmp.put_u16_le(self.id);
18987        __tmp.put_u8(self.count);
18988        for val in &self.data {
18989            __tmp.put_u8(*val);
18990        }
18991        if matches!(version, MavlinkVersion::V2) {
18992            let len = __tmp.len();
18993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18994        } else {
18995            __tmp.len()
18996        }
18997    }
18998}
18999#[doc = "Reply to LOG_REQUEST_LIST."]
19000#[doc = ""]
19001#[doc = "ID: 118"]
19002#[derive(Debug, Clone, PartialEq)]
19003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19005#[cfg_attr(feature = "ts", derive(TS))]
19006#[cfg_attr(feature = "ts", ts(export))]
19007pub struct LOG_ENTRY_DATA {
19008    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19009    pub time_utc: u32,
19010    #[doc = "Size of the log (may be approximate)"]
19011    pub size: u32,
19012    #[doc = "Log id"]
19013    pub id: u16,
19014    #[doc = "Total number of logs"]
19015    pub num_logs: u16,
19016    #[doc = "High log number"]
19017    pub last_log_num: u16,
19018}
19019impl LOG_ENTRY_DATA {
19020    pub const ENCODED_LEN: usize = 14usize;
19021    pub const DEFAULT: Self = Self {
19022        time_utc: 0_u32,
19023        size: 0_u32,
19024        id: 0_u16,
19025        num_logs: 0_u16,
19026        last_log_num: 0_u16,
19027    };
19028    #[cfg(feature = "arbitrary")]
19029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19030        use arbitrary::{Arbitrary, Unstructured};
19031        let mut buf = [0u8; 1024];
19032        rng.fill_bytes(&mut buf);
19033        let mut unstructured = Unstructured::new(&buf);
19034        Self::arbitrary(&mut unstructured).unwrap_or_default()
19035    }
19036}
19037impl Default for LOG_ENTRY_DATA {
19038    fn default() -> Self {
19039        Self::DEFAULT.clone()
19040    }
19041}
19042impl MessageData for LOG_ENTRY_DATA {
19043    type Message = MavMessage;
19044    const ID: u32 = 118u32;
19045    const NAME: &'static str = "LOG_ENTRY";
19046    const EXTRA_CRC: u8 = 56u8;
19047    const ENCODED_LEN: usize = 14usize;
19048    fn deser(
19049        _version: MavlinkVersion,
19050        __input: &[u8],
19051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19052        let avail_len = __input.len();
19053        let mut payload_buf = [0; Self::ENCODED_LEN];
19054        let mut buf = if avail_len < Self::ENCODED_LEN {
19055            payload_buf[0..avail_len].copy_from_slice(__input);
19056            Bytes::new(&payload_buf)
19057        } else {
19058            Bytes::new(__input)
19059        };
19060        let mut __struct = Self::default();
19061        __struct.time_utc = buf.get_u32_le();
19062        __struct.size = buf.get_u32_le();
19063        __struct.id = buf.get_u16_le();
19064        __struct.num_logs = buf.get_u16_le();
19065        __struct.last_log_num = buf.get_u16_le();
19066        Ok(__struct)
19067    }
19068    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19069        let mut __tmp = BytesMut::new(bytes);
19070        #[allow(clippy::absurd_extreme_comparisons)]
19071        #[allow(unused_comparisons)]
19072        if __tmp.remaining() < Self::ENCODED_LEN {
19073            panic!(
19074                "buffer is too small (need {} bytes, but got {})",
19075                Self::ENCODED_LEN,
19076                __tmp.remaining(),
19077            )
19078        }
19079        __tmp.put_u32_le(self.time_utc);
19080        __tmp.put_u32_le(self.size);
19081        __tmp.put_u16_le(self.id);
19082        __tmp.put_u16_le(self.num_logs);
19083        __tmp.put_u16_le(self.last_log_num);
19084        if matches!(version, MavlinkVersion::V2) {
19085            let len = __tmp.len();
19086            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19087        } else {
19088            __tmp.len()
19089        }
19090    }
19091}
19092#[doc = "Erase all logs."]
19093#[doc = ""]
19094#[doc = "ID: 121"]
19095#[derive(Debug, Clone, PartialEq)]
19096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19098#[cfg_attr(feature = "ts", derive(TS))]
19099#[cfg_attr(feature = "ts", ts(export))]
19100pub struct LOG_ERASE_DATA {
19101    #[doc = "System ID"]
19102    pub target_system: u8,
19103    #[doc = "Component ID"]
19104    pub target_component: u8,
19105}
19106impl LOG_ERASE_DATA {
19107    pub const ENCODED_LEN: usize = 2usize;
19108    pub const DEFAULT: Self = Self {
19109        target_system: 0_u8,
19110        target_component: 0_u8,
19111    };
19112    #[cfg(feature = "arbitrary")]
19113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19114        use arbitrary::{Arbitrary, Unstructured};
19115        let mut buf = [0u8; 1024];
19116        rng.fill_bytes(&mut buf);
19117        let mut unstructured = Unstructured::new(&buf);
19118        Self::arbitrary(&mut unstructured).unwrap_or_default()
19119    }
19120}
19121impl Default for LOG_ERASE_DATA {
19122    fn default() -> Self {
19123        Self::DEFAULT.clone()
19124    }
19125}
19126impl MessageData for LOG_ERASE_DATA {
19127    type Message = MavMessage;
19128    const ID: u32 = 121u32;
19129    const NAME: &'static str = "LOG_ERASE";
19130    const EXTRA_CRC: u8 = 237u8;
19131    const ENCODED_LEN: usize = 2usize;
19132    fn deser(
19133        _version: MavlinkVersion,
19134        __input: &[u8],
19135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19136        let avail_len = __input.len();
19137        let mut payload_buf = [0; Self::ENCODED_LEN];
19138        let mut buf = if avail_len < Self::ENCODED_LEN {
19139            payload_buf[0..avail_len].copy_from_slice(__input);
19140            Bytes::new(&payload_buf)
19141        } else {
19142            Bytes::new(__input)
19143        };
19144        let mut __struct = Self::default();
19145        __struct.target_system = buf.get_u8();
19146        __struct.target_component = buf.get_u8();
19147        Ok(__struct)
19148    }
19149    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19150        let mut __tmp = BytesMut::new(bytes);
19151        #[allow(clippy::absurd_extreme_comparisons)]
19152        #[allow(unused_comparisons)]
19153        if __tmp.remaining() < Self::ENCODED_LEN {
19154            panic!(
19155                "buffer is too small (need {} bytes, but got {})",
19156                Self::ENCODED_LEN,
19157                __tmp.remaining(),
19158            )
19159        }
19160        __tmp.put_u8(self.target_system);
19161        __tmp.put_u8(self.target_component);
19162        if matches!(version, MavlinkVersion::V2) {
19163            let len = __tmp.len();
19164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19165        } else {
19166            __tmp.len()
19167        }
19168    }
19169}
19170#[doc = "Request a chunk of a log."]
19171#[doc = ""]
19172#[doc = "ID: 119"]
19173#[derive(Debug, Clone, PartialEq)]
19174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19176#[cfg_attr(feature = "ts", derive(TS))]
19177#[cfg_attr(feature = "ts", ts(export))]
19178pub struct LOG_REQUEST_DATA_DATA {
19179    #[doc = "Offset into the log"]
19180    pub ofs: u32,
19181    #[doc = "Number of bytes"]
19182    pub count: u32,
19183    #[doc = "Log id (from LOG_ENTRY reply)"]
19184    pub id: u16,
19185    #[doc = "System ID"]
19186    pub target_system: u8,
19187    #[doc = "Component ID"]
19188    pub target_component: u8,
19189}
19190impl LOG_REQUEST_DATA_DATA {
19191    pub const ENCODED_LEN: usize = 12usize;
19192    pub const DEFAULT: Self = Self {
19193        ofs: 0_u32,
19194        count: 0_u32,
19195        id: 0_u16,
19196        target_system: 0_u8,
19197        target_component: 0_u8,
19198    };
19199    #[cfg(feature = "arbitrary")]
19200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19201        use arbitrary::{Arbitrary, Unstructured};
19202        let mut buf = [0u8; 1024];
19203        rng.fill_bytes(&mut buf);
19204        let mut unstructured = Unstructured::new(&buf);
19205        Self::arbitrary(&mut unstructured).unwrap_or_default()
19206    }
19207}
19208impl Default for LOG_REQUEST_DATA_DATA {
19209    fn default() -> Self {
19210        Self::DEFAULT.clone()
19211    }
19212}
19213impl MessageData for LOG_REQUEST_DATA_DATA {
19214    type Message = MavMessage;
19215    const ID: u32 = 119u32;
19216    const NAME: &'static str = "LOG_REQUEST_DATA";
19217    const EXTRA_CRC: u8 = 116u8;
19218    const ENCODED_LEN: usize = 12usize;
19219    fn deser(
19220        _version: MavlinkVersion,
19221        __input: &[u8],
19222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19223        let avail_len = __input.len();
19224        let mut payload_buf = [0; Self::ENCODED_LEN];
19225        let mut buf = if avail_len < Self::ENCODED_LEN {
19226            payload_buf[0..avail_len].copy_from_slice(__input);
19227            Bytes::new(&payload_buf)
19228        } else {
19229            Bytes::new(__input)
19230        };
19231        let mut __struct = Self::default();
19232        __struct.ofs = buf.get_u32_le();
19233        __struct.count = buf.get_u32_le();
19234        __struct.id = buf.get_u16_le();
19235        __struct.target_system = buf.get_u8();
19236        __struct.target_component = buf.get_u8();
19237        Ok(__struct)
19238    }
19239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19240        let mut __tmp = BytesMut::new(bytes);
19241        #[allow(clippy::absurd_extreme_comparisons)]
19242        #[allow(unused_comparisons)]
19243        if __tmp.remaining() < Self::ENCODED_LEN {
19244            panic!(
19245                "buffer is too small (need {} bytes, but got {})",
19246                Self::ENCODED_LEN,
19247                __tmp.remaining(),
19248            )
19249        }
19250        __tmp.put_u32_le(self.ofs);
19251        __tmp.put_u32_le(self.count);
19252        __tmp.put_u16_le(self.id);
19253        __tmp.put_u8(self.target_system);
19254        __tmp.put_u8(self.target_component);
19255        if matches!(version, MavlinkVersion::V2) {
19256            let len = __tmp.len();
19257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19258        } else {
19259            __tmp.len()
19260        }
19261    }
19262}
19263#[doc = "Stop log transfer and resume normal logging."]
19264#[doc = ""]
19265#[doc = "ID: 122"]
19266#[derive(Debug, Clone, PartialEq)]
19267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19269#[cfg_attr(feature = "ts", derive(TS))]
19270#[cfg_attr(feature = "ts", ts(export))]
19271pub struct LOG_REQUEST_END_DATA {
19272    #[doc = "System ID"]
19273    pub target_system: u8,
19274    #[doc = "Component ID"]
19275    pub target_component: u8,
19276}
19277impl LOG_REQUEST_END_DATA {
19278    pub const ENCODED_LEN: usize = 2usize;
19279    pub const DEFAULT: Self = Self {
19280        target_system: 0_u8,
19281        target_component: 0_u8,
19282    };
19283    #[cfg(feature = "arbitrary")]
19284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19285        use arbitrary::{Arbitrary, Unstructured};
19286        let mut buf = [0u8; 1024];
19287        rng.fill_bytes(&mut buf);
19288        let mut unstructured = Unstructured::new(&buf);
19289        Self::arbitrary(&mut unstructured).unwrap_or_default()
19290    }
19291}
19292impl Default for LOG_REQUEST_END_DATA {
19293    fn default() -> Self {
19294        Self::DEFAULT.clone()
19295    }
19296}
19297impl MessageData for LOG_REQUEST_END_DATA {
19298    type Message = MavMessage;
19299    const ID: u32 = 122u32;
19300    const NAME: &'static str = "LOG_REQUEST_END";
19301    const EXTRA_CRC: u8 = 203u8;
19302    const ENCODED_LEN: usize = 2usize;
19303    fn deser(
19304        _version: MavlinkVersion,
19305        __input: &[u8],
19306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19307        let avail_len = __input.len();
19308        let mut payload_buf = [0; Self::ENCODED_LEN];
19309        let mut buf = if avail_len < Self::ENCODED_LEN {
19310            payload_buf[0..avail_len].copy_from_slice(__input);
19311            Bytes::new(&payload_buf)
19312        } else {
19313            Bytes::new(__input)
19314        };
19315        let mut __struct = Self::default();
19316        __struct.target_system = buf.get_u8();
19317        __struct.target_component = buf.get_u8();
19318        Ok(__struct)
19319    }
19320    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19321        let mut __tmp = BytesMut::new(bytes);
19322        #[allow(clippy::absurd_extreme_comparisons)]
19323        #[allow(unused_comparisons)]
19324        if __tmp.remaining() < Self::ENCODED_LEN {
19325            panic!(
19326                "buffer is too small (need {} bytes, but got {})",
19327                Self::ENCODED_LEN,
19328                __tmp.remaining(),
19329            )
19330        }
19331        __tmp.put_u8(self.target_system);
19332        __tmp.put_u8(self.target_component);
19333        if matches!(version, MavlinkVersion::V2) {
19334            let len = __tmp.len();
19335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19336        } else {
19337            __tmp.len()
19338        }
19339    }
19340}
19341#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19342#[doc = ""]
19343#[doc = "ID: 117"]
19344#[derive(Debug, Clone, PartialEq)]
19345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19347#[cfg_attr(feature = "ts", derive(TS))]
19348#[cfg_attr(feature = "ts", ts(export))]
19349pub struct LOG_REQUEST_LIST_DATA {
19350    #[doc = "First log id (0 for first available)"]
19351    pub start: u16,
19352    #[doc = "Last log id (0xffff for last available)"]
19353    pub end: u16,
19354    #[doc = "System ID"]
19355    pub target_system: u8,
19356    #[doc = "Component ID"]
19357    pub target_component: u8,
19358}
19359impl LOG_REQUEST_LIST_DATA {
19360    pub const ENCODED_LEN: usize = 6usize;
19361    pub const DEFAULT: Self = Self {
19362        start: 0_u16,
19363        end: 0_u16,
19364        target_system: 0_u8,
19365        target_component: 0_u8,
19366    };
19367    #[cfg(feature = "arbitrary")]
19368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19369        use arbitrary::{Arbitrary, Unstructured};
19370        let mut buf = [0u8; 1024];
19371        rng.fill_bytes(&mut buf);
19372        let mut unstructured = Unstructured::new(&buf);
19373        Self::arbitrary(&mut unstructured).unwrap_or_default()
19374    }
19375}
19376impl Default for LOG_REQUEST_LIST_DATA {
19377    fn default() -> Self {
19378        Self::DEFAULT.clone()
19379    }
19380}
19381impl MessageData for LOG_REQUEST_LIST_DATA {
19382    type Message = MavMessage;
19383    const ID: u32 = 117u32;
19384    const NAME: &'static str = "LOG_REQUEST_LIST";
19385    const EXTRA_CRC: u8 = 128u8;
19386    const ENCODED_LEN: usize = 6usize;
19387    fn deser(
19388        _version: MavlinkVersion,
19389        __input: &[u8],
19390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19391        let avail_len = __input.len();
19392        let mut payload_buf = [0; Self::ENCODED_LEN];
19393        let mut buf = if avail_len < Self::ENCODED_LEN {
19394            payload_buf[0..avail_len].copy_from_slice(__input);
19395            Bytes::new(&payload_buf)
19396        } else {
19397            Bytes::new(__input)
19398        };
19399        let mut __struct = Self::default();
19400        __struct.start = buf.get_u16_le();
19401        __struct.end = buf.get_u16_le();
19402        __struct.target_system = buf.get_u8();
19403        __struct.target_component = buf.get_u8();
19404        Ok(__struct)
19405    }
19406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19407        let mut __tmp = BytesMut::new(bytes);
19408        #[allow(clippy::absurd_extreme_comparisons)]
19409        #[allow(unused_comparisons)]
19410        if __tmp.remaining() < Self::ENCODED_LEN {
19411            panic!(
19412                "buffer is too small (need {} bytes, but got {})",
19413                Self::ENCODED_LEN,
19414                __tmp.remaining(),
19415            )
19416        }
19417        __tmp.put_u16_le(self.start);
19418        __tmp.put_u16_le(self.end);
19419        __tmp.put_u8(self.target_system);
19420        __tmp.put_u8(self.target_component);
19421        if matches!(version, MavlinkVersion::V2) {
19422            let len = __tmp.len();
19423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19424        } else {
19425            __tmp.len()
19426        }
19427    }
19428}
19429#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19430#[doc = ""]
19431#[doc = "ID: 192"]
19432#[derive(Debug, Clone, PartialEq)]
19433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19435#[cfg_attr(feature = "ts", derive(TS))]
19436#[cfg_attr(feature = "ts", ts(export))]
19437pub struct MAG_CAL_REPORT_DATA {
19438    #[doc = "RMS milligauss residuals."]
19439    pub fitness: f32,
19440    #[doc = "X offset."]
19441    pub ofs_x: f32,
19442    #[doc = "Y offset."]
19443    pub ofs_y: f32,
19444    #[doc = "Z offset."]
19445    pub ofs_z: f32,
19446    #[doc = "X diagonal (matrix 11)."]
19447    pub diag_x: f32,
19448    #[doc = "Y diagonal (matrix 22)."]
19449    pub diag_y: f32,
19450    #[doc = "Z diagonal (matrix 33)."]
19451    pub diag_z: f32,
19452    #[doc = "X off-diagonal (matrix 12 and 21)."]
19453    pub offdiag_x: f32,
19454    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19455    pub offdiag_y: f32,
19456    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19457    pub offdiag_z: f32,
19458    #[doc = "Compass being calibrated."]
19459    pub compass_id: u8,
19460    #[doc = "Bitmask of compasses being calibrated."]
19461    pub cal_mask: u8,
19462    #[doc = "Calibration Status."]
19463    pub cal_status: MagCalStatus,
19464    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19465    pub autosaved: u8,
19466    #[doc = "Confidence in orientation (higher is better)."]
19467    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19468    pub orientation_confidence: f32,
19469    #[doc = "orientation before calibration."]
19470    #[cfg_attr(feature = "serde", serde(default))]
19471    pub old_orientation: MavSensorOrientation,
19472    #[doc = "orientation after calibration."]
19473    #[cfg_attr(feature = "serde", serde(default))]
19474    pub new_orientation: MavSensorOrientation,
19475    #[doc = "field radius correction factor"]
19476    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19477    pub scale_factor: f32,
19478}
19479impl MAG_CAL_REPORT_DATA {
19480    pub const ENCODED_LEN: usize = 54usize;
19481    pub const DEFAULT: Self = Self {
19482        fitness: 0.0_f32,
19483        ofs_x: 0.0_f32,
19484        ofs_y: 0.0_f32,
19485        ofs_z: 0.0_f32,
19486        diag_x: 0.0_f32,
19487        diag_y: 0.0_f32,
19488        diag_z: 0.0_f32,
19489        offdiag_x: 0.0_f32,
19490        offdiag_y: 0.0_f32,
19491        offdiag_z: 0.0_f32,
19492        compass_id: 0_u8,
19493        cal_mask: 0_u8,
19494        cal_status: MagCalStatus::DEFAULT,
19495        autosaved: 0_u8,
19496        orientation_confidence: 0.0_f32,
19497        old_orientation: MavSensorOrientation::DEFAULT,
19498        new_orientation: MavSensorOrientation::DEFAULT,
19499        scale_factor: 0.0_f32,
19500    };
19501    #[cfg(feature = "arbitrary")]
19502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19503        use arbitrary::{Arbitrary, Unstructured};
19504        let mut buf = [0u8; 1024];
19505        rng.fill_bytes(&mut buf);
19506        let mut unstructured = Unstructured::new(&buf);
19507        Self::arbitrary(&mut unstructured).unwrap_or_default()
19508    }
19509}
19510impl Default for MAG_CAL_REPORT_DATA {
19511    fn default() -> Self {
19512        Self::DEFAULT.clone()
19513    }
19514}
19515impl MessageData for MAG_CAL_REPORT_DATA {
19516    type Message = MavMessage;
19517    const ID: u32 = 192u32;
19518    const NAME: &'static str = "MAG_CAL_REPORT";
19519    const EXTRA_CRC: u8 = 36u8;
19520    const ENCODED_LEN: usize = 54usize;
19521    fn deser(
19522        _version: MavlinkVersion,
19523        __input: &[u8],
19524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19525        let avail_len = __input.len();
19526        let mut payload_buf = [0; Self::ENCODED_LEN];
19527        let mut buf = if avail_len < Self::ENCODED_LEN {
19528            payload_buf[0..avail_len].copy_from_slice(__input);
19529            Bytes::new(&payload_buf)
19530        } else {
19531            Bytes::new(__input)
19532        };
19533        let mut __struct = Self::default();
19534        __struct.fitness = buf.get_f32_le();
19535        __struct.ofs_x = buf.get_f32_le();
19536        __struct.ofs_y = buf.get_f32_le();
19537        __struct.ofs_z = buf.get_f32_le();
19538        __struct.diag_x = buf.get_f32_le();
19539        __struct.diag_y = buf.get_f32_le();
19540        __struct.diag_z = buf.get_f32_le();
19541        __struct.offdiag_x = buf.get_f32_le();
19542        __struct.offdiag_y = buf.get_f32_le();
19543        __struct.offdiag_z = buf.get_f32_le();
19544        __struct.compass_id = buf.get_u8();
19545        __struct.cal_mask = buf.get_u8();
19546        let tmp = buf.get_u8();
19547        __struct.cal_status =
19548            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19549                enum_type: "MagCalStatus",
19550                value: tmp as u64,
19551            })?;
19552        __struct.autosaved = buf.get_u8();
19553        __struct.orientation_confidence = buf.get_f32_le();
19554        let tmp = buf.get_u8();
19555        __struct.old_orientation =
19556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19557                enum_type: "MavSensorOrientation",
19558                value: tmp as u64,
19559            })?;
19560        let tmp = buf.get_u8();
19561        __struct.new_orientation =
19562            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19563                enum_type: "MavSensorOrientation",
19564                value: tmp as u64,
19565            })?;
19566        __struct.scale_factor = buf.get_f32_le();
19567        Ok(__struct)
19568    }
19569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19570        let mut __tmp = BytesMut::new(bytes);
19571        #[allow(clippy::absurd_extreme_comparisons)]
19572        #[allow(unused_comparisons)]
19573        if __tmp.remaining() < Self::ENCODED_LEN {
19574            panic!(
19575                "buffer is too small (need {} bytes, but got {})",
19576                Self::ENCODED_LEN,
19577                __tmp.remaining(),
19578            )
19579        }
19580        __tmp.put_f32_le(self.fitness);
19581        __tmp.put_f32_le(self.ofs_x);
19582        __tmp.put_f32_le(self.ofs_y);
19583        __tmp.put_f32_le(self.ofs_z);
19584        __tmp.put_f32_le(self.diag_x);
19585        __tmp.put_f32_le(self.diag_y);
19586        __tmp.put_f32_le(self.diag_z);
19587        __tmp.put_f32_le(self.offdiag_x);
19588        __tmp.put_f32_le(self.offdiag_y);
19589        __tmp.put_f32_le(self.offdiag_z);
19590        __tmp.put_u8(self.compass_id);
19591        __tmp.put_u8(self.cal_mask);
19592        __tmp.put_u8(self.cal_status as u8);
19593        __tmp.put_u8(self.autosaved);
19594        if matches!(version, MavlinkVersion::V2) {
19595            __tmp.put_f32_le(self.orientation_confidence);
19596            __tmp.put_u8(self.old_orientation as u8);
19597            __tmp.put_u8(self.new_orientation as u8);
19598            __tmp.put_f32_le(self.scale_factor);
19599            let len = __tmp.len();
19600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19601        } else {
19602            __tmp.len()
19603        }
19604    }
19605}
19606#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19607#[doc = ""]
19608#[doc = "ID: 69"]
19609#[derive(Debug, Clone, PartialEq)]
19610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19612#[cfg_attr(feature = "ts", derive(TS))]
19613#[cfg_attr(feature = "ts", ts(export))]
19614pub struct MANUAL_CONTROL_DATA {
19615    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19616    pub x: i16,
19617    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19618    pub y: i16,
19619    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19620    pub z: i16,
19621    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19622    pub r: i16,
19623    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19624    pub buttons: u16,
19625    #[doc = "The system to be controlled."]
19626    pub target: u8,
19627    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19629    pub buttons2: u16,
19630    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19632    pub enabled_extensions: u8,
19633    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19635    pub s: i16,
19636    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19638    pub t: i16,
19639    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19641    pub aux1: i16,
19642    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19644    pub aux2: i16,
19645    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19647    pub aux3: i16,
19648    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19650    pub aux4: i16,
19651    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19653    pub aux5: i16,
19654    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19656    pub aux6: i16,
19657}
19658impl MANUAL_CONTROL_DATA {
19659    pub const ENCODED_LEN: usize = 30usize;
19660    pub const DEFAULT: Self = Self {
19661        x: 0_i16,
19662        y: 0_i16,
19663        z: 0_i16,
19664        r: 0_i16,
19665        buttons: 0_u16,
19666        target: 0_u8,
19667        buttons2: 0_u16,
19668        enabled_extensions: 0_u8,
19669        s: 0_i16,
19670        t: 0_i16,
19671        aux1: 0_i16,
19672        aux2: 0_i16,
19673        aux3: 0_i16,
19674        aux4: 0_i16,
19675        aux5: 0_i16,
19676        aux6: 0_i16,
19677    };
19678    #[cfg(feature = "arbitrary")]
19679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19680        use arbitrary::{Arbitrary, Unstructured};
19681        let mut buf = [0u8; 1024];
19682        rng.fill_bytes(&mut buf);
19683        let mut unstructured = Unstructured::new(&buf);
19684        Self::arbitrary(&mut unstructured).unwrap_or_default()
19685    }
19686}
19687impl Default for MANUAL_CONTROL_DATA {
19688    fn default() -> Self {
19689        Self::DEFAULT.clone()
19690    }
19691}
19692impl MessageData for MANUAL_CONTROL_DATA {
19693    type Message = MavMessage;
19694    const ID: u32 = 69u32;
19695    const NAME: &'static str = "MANUAL_CONTROL";
19696    const EXTRA_CRC: u8 = 243u8;
19697    const ENCODED_LEN: usize = 30usize;
19698    fn deser(
19699        _version: MavlinkVersion,
19700        __input: &[u8],
19701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19702        let avail_len = __input.len();
19703        let mut payload_buf = [0; Self::ENCODED_LEN];
19704        let mut buf = if avail_len < Self::ENCODED_LEN {
19705            payload_buf[0..avail_len].copy_from_slice(__input);
19706            Bytes::new(&payload_buf)
19707        } else {
19708            Bytes::new(__input)
19709        };
19710        let mut __struct = Self::default();
19711        __struct.x = buf.get_i16_le();
19712        __struct.y = buf.get_i16_le();
19713        __struct.z = buf.get_i16_le();
19714        __struct.r = buf.get_i16_le();
19715        __struct.buttons = buf.get_u16_le();
19716        __struct.target = buf.get_u8();
19717        __struct.buttons2 = buf.get_u16_le();
19718        __struct.enabled_extensions = buf.get_u8();
19719        __struct.s = buf.get_i16_le();
19720        __struct.t = buf.get_i16_le();
19721        __struct.aux1 = buf.get_i16_le();
19722        __struct.aux2 = buf.get_i16_le();
19723        __struct.aux3 = buf.get_i16_le();
19724        __struct.aux4 = buf.get_i16_le();
19725        __struct.aux5 = buf.get_i16_le();
19726        __struct.aux6 = buf.get_i16_le();
19727        Ok(__struct)
19728    }
19729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19730        let mut __tmp = BytesMut::new(bytes);
19731        #[allow(clippy::absurd_extreme_comparisons)]
19732        #[allow(unused_comparisons)]
19733        if __tmp.remaining() < Self::ENCODED_LEN {
19734            panic!(
19735                "buffer is too small (need {} bytes, but got {})",
19736                Self::ENCODED_LEN,
19737                __tmp.remaining(),
19738            )
19739        }
19740        __tmp.put_i16_le(self.x);
19741        __tmp.put_i16_le(self.y);
19742        __tmp.put_i16_le(self.z);
19743        __tmp.put_i16_le(self.r);
19744        __tmp.put_u16_le(self.buttons);
19745        __tmp.put_u8(self.target);
19746        if matches!(version, MavlinkVersion::V2) {
19747            __tmp.put_u16_le(self.buttons2);
19748            __tmp.put_u8(self.enabled_extensions);
19749            __tmp.put_i16_le(self.s);
19750            __tmp.put_i16_le(self.t);
19751            __tmp.put_i16_le(self.aux1);
19752            __tmp.put_i16_le(self.aux2);
19753            __tmp.put_i16_le(self.aux3);
19754            __tmp.put_i16_le(self.aux4);
19755            __tmp.put_i16_le(self.aux5);
19756            __tmp.put_i16_le(self.aux6);
19757            let len = __tmp.len();
19758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19759        } else {
19760            __tmp.len()
19761        }
19762    }
19763}
19764#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19765#[doc = ""]
19766#[doc = "ID: 81"]
19767#[derive(Debug, Clone, PartialEq)]
19768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19770#[cfg_attr(feature = "ts", derive(TS))]
19771#[cfg_attr(feature = "ts", ts(export))]
19772pub struct MANUAL_SETPOINT_DATA {
19773    #[doc = "Timestamp (time since system boot)."]
19774    pub time_boot_ms: u32,
19775    #[doc = "Desired roll rate"]
19776    pub roll: f32,
19777    #[doc = "Desired pitch rate"]
19778    pub pitch: f32,
19779    #[doc = "Desired yaw rate"]
19780    pub yaw: f32,
19781    #[doc = "Collective thrust, normalized to 0 .. 1"]
19782    pub thrust: f32,
19783    #[doc = "Flight mode switch position, 0.. 255"]
19784    pub mode_switch: u8,
19785    #[doc = "Override mode switch position, 0.. 255"]
19786    pub manual_override_switch: u8,
19787}
19788impl MANUAL_SETPOINT_DATA {
19789    pub const ENCODED_LEN: usize = 22usize;
19790    pub const DEFAULT: Self = Self {
19791        time_boot_ms: 0_u32,
19792        roll: 0.0_f32,
19793        pitch: 0.0_f32,
19794        yaw: 0.0_f32,
19795        thrust: 0.0_f32,
19796        mode_switch: 0_u8,
19797        manual_override_switch: 0_u8,
19798    };
19799    #[cfg(feature = "arbitrary")]
19800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19801        use arbitrary::{Arbitrary, Unstructured};
19802        let mut buf = [0u8; 1024];
19803        rng.fill_bytes(&mut buf);
19804        let mut unstructured = Unstructured::new(&buf);
19805        Self::arbitrary(&mut unstructured).unwrap_or_default()
19806    }
19807}
19808impl Default for MANUAL_SETPOINT_DATA {
19809    fn default() -> Self {
19810        Self::DEFAULT.clone()
19811    }
19812}
19813impl MessageData for MANUAL_SETPOINT_DATA {
19814    type Message = MavMessage;
19815    const ID: u32 = 81u32;
19816    const NAME: &'static str = "MANUAL_SETPOINT";
19817    const EXTRA_CRC: u8 = 106u8;
19818    const ENCODED_LEN: usize = 22usize;
19819    fn deser(
19820        _version: MavlinkVersion,
19821        __input: &[u8],
19822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19823        let avail_len = __input.len();
19824        let mut payload_buf = [0; Self::ENCODED_LEN];
19825        let mut buf = if avail_len < Self::ENCODED_LEN {
19826            payload_buf[0..avail_len].copy_from_slice(__input);
19827            Bytes::new(&payload_buf)
19828        } else {
19829            Bytes::new(__input)
19830        };
19831        let mut __struct = Self::default();
19832        __struct.time_boot_ms = buf.get_u32_le();
19833        __struct.roll = buf.get_f32_le();
19834        __struct.pitch = buf.get_f32_le();
19835        __struct.yaw = buf.get_f32_le();
19836        __struct.thrust = buf.get_f32_le();
19837        __struct.mode_switch = buf.get_u8();
19838        __struct.manual_override_switch = buf.get_u8();
19839        Ok(__struct)
19840    }
19841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19842        let mut __tmp = BytesMut::new(bytes);
19843        #[allow(clippy::absurd_extreme_comparisons)]
19844        #[allow(unused_comparisons)]
19845        if __tmp.remaining() < Self::ENCODED_LEN {
19846            panic!(
19847                "buffer is too small (need {} bytes, but got {})",
19848                Self::ENCODED_LEN,
19849                __tmp.remaining(),
19850            )
19851        }
19852        __tmp.put_u32_le(self.time_boot_ms);
19853        __tmp.put_f32_le(self.roll);
19854        __tmp.put_f32_le(self.pitch);
19855        __tmp.put_f32_le(self.yaw);
19856        __tmp.put_f32_le(self.thrust);
19857        __tmp.put_u8(self.mode_switch);
19858        __tmp.put_u8(self.manual_override_switch);
19859        if matches!(version, MavlinkVersion::V2) {
19860            let len = __tmp.len();
19861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19862        } else {
19863            __tmp.len()
19864        }
19865    }
19866}
19867#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19868#[doc = ""]
19869#[doc = "ID: 249"]
19870#[derive(Debug, Clone, PartialEq)]
19871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19873#[cfg_attr(feature = "ts", derive(TS))]
19874#[cfg_attr(feature = "ts", ts(export))]
19875pub struct MEMORY_VECT_DATA {
19876    #[doc = "Starting address of the debug variables"]
19877    pub address: u16,
19878    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19879    pub ver: u8,
19880    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19881    pub mavtype: u8,
19882    #[doc = "Memory contents at specified address"]
19883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19884    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19885    pub value: [i8; 32],
19886}
19887impl MEMORY_VECT_DATA {
19888    pub const ENCODED_LEN: usize = 36usize;
19889    pub const DEFAULT: Self = Self {
19890        address: 0_u16,
19891        ver: 0_u8,
19892        mavtype: 0_u8,
19893        value: [0_i8; 32usize],
19894    };
19895    #[cfg(feature = "arbitrary")]
19896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19897        use arbitrary::{Arbitrary, Unstructured};
19898        let mut buf = [0u8; 1024];
19899        rng.fill_bytes(&mut buf);
19900        let mut unstructured = Unstructured::new(&buf);
19901        Self::arbitrary(&mut unstructured).unwrap_or_default()
19902    }
19903}
19904impl Default for MEMORY_VECT_DATA {
19905    fn default() -> Self {
19906        Self::DEFAULT.clone()
19907    }
19908}
19909impl MessageData for MEMORY_VECT_DATA {
19910    type Message = MavMessage;
19911    const ID: u32 = 249u32;
19912    const NAME: &'static str = "MEMORY_VECT";
19913    const EXTRA_CRC: u8 = 204u8;
19914    const ENCODED_LEN: usize = 36usize;
19915    fn deser(
19916        _version: MavlinkVersion,
19917        __input: &[u8],
19918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19919        let avail_len = __input.len();
19920        let mut payload_buf = [0; Self::ENCODED_LEN];
19921        let mut buf = if avail_len < Self::ENCODED_LEN {
19922            payload_buf[0..avail_len].copy_from_slice(__input);
19923            Bytes::new(&payload_buf)
19924        } else {
19925            Bytes::new(__input)
19926        };
19927        let mut __struct = Self::default();
19928        __struct.address = buf.get_u16_le();
19929        __struct.ver = buf.get_u8();
19930        __struct.mavtype = buf.get_u8();
19931        for v in &mut __struct.value {
19932            let val = buf.get_i8();
19933            *v = val;
19934        }
19935        Ok(__struct)
19936    }
19937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19938        let mut __tmp = BytesMut::new(bytes);
19939        #[allow(clippy::absurd_extreme_comparisons)]
19940        #[allow(unused_comparisons)]
19941        if __tmp.remaining() < Self::ENCODED_LEN {
19942            panic!(
19943                "buffer is too small (need {} bytes, but got {})",
19944                Self::ENCODED_LEN,
19945                __tmp.remaining(),
19946            )
19947        }
19948        __tmp.put_u16_le(self.address);
19949        __tmp.put_u8(self.ver);
19950        __tmp.put_u8(self.mavtype);
19951        for val in &self.value {
19952            __tmp.put_i8(*val);
19953        }
19954        if matches!(version, MavlinkVersion::V2) {
19955            let len = __tmp.len();
19956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19957        } else {
19958            __tmp.len()
19959        }
19960    }
19961}
19962#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19963#[doc = ""]
19964#[doc = "ID: 244"]
19965#[derive(Debug, Clone, PartialEq)]
19966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19968#[cfg_attr(feature = "ts", derive(TS))]
19969#[cfg_attr(feature = "ts", ts(export))]
19970pub struct MESSAGE_INTERVAL_DATA {
19971    #[doc = "0 indicates the interval at which it is sent."]
19972    pub interval_us: i32,
19973    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19974    pub message_id: u16,
19975}
19976impl MESSAGE_INTERVAL_DATA {
19977    pub const ENCODED_LEN: usize = 6usize;
19978    pub const DEFAULT: Self = Self {
19979        interval_us: 0_i32,
19980        message_id: 0_u16,
19981    };
19982    #[cfg(feature = "arbitrary")]
19983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19984        use arbitrary::{Arbitrary, Unstructured};
19985        let mut buf = [0u8; 1024];
19986        rng.fill_bytes(&mut buf);
19987        let mut unstructured = Unstructured::new(&buf);
19988        Self::arbitrary(&mut unstructured).unwrap_or_default()
19989    }
19990}
19991impl Default for MESSAGE_INTERVAL_DATA {
19992    fn default() -> Self {
19993        Self::DEFAULT.clone()
19994    }
19995}
19996impl MessageData for MESSAGE_INTERVAL_DATA {
19997    type Message = MavMessage;
19998    const ID: u32 = 244u32;
19999    const NAME: &'static str = "MESSAGE_INTERVAL";
20000    const EXTRA_CRC: u8 = 95u8;
20001    const ENCODED_LEN: usize = 6usize;
20002    fn deser(
20003        _version: MavlinkVersion,
20004        __input: &[u8],
20005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20006        let avail_len = __input.len();
20007        let mut payload_buf = [0; Self::ENCODED_LEN];
20008        let mut buf = if avail_len < Self::ENCODED_LEN {
20009            payload_buf[0..avail_len].copy_from_slice(__input);
20010            Bytes::new(&payload_buf)
20011        } else {
20012            Bytes::new(__input)
20013        };
20014        let mut __struct = Self::default();
20015        __struct.interval_us = buf.get_i32_le();
20016        __struct.message_id = buf.get_u16_le();
20017        Ok(__struct)
20018    }
20019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20020        let mut __tmp = BytesMut::new(bytes);
20021        #[allow(clippy::absurd_extreme_comparisons)]
20022        #[allow(unused_comparisons)]
20023        if __tmp.remaining() < Self::ENCODED_LEN {
20024            panic!(
20025                "buffer is too small (need {} bytes, but got {})",
20026                Self::ENCODED_LEN,
20027                __tmp.remaining(),
20028            )
20029        }
20030        __tmp.put_i32_le(self.interval_us);
20031        __tmp.put_u16_le(self.message_id);
20032        if matches!(version, MavlinkVersion::V2) {
20033            let len = __tmp.len();
20034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20035        } else {
20036            __tmp.len()
20037        }
20038    }
20039}
20040#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20041#[doc = ""]
20042#[doc = "ID: 47"]
20043#[derive(Debug, Clone, PartialEq)]
20044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20046#[cfg_attr(feature = "ts", derive(TS))]
20047#[cfg_attr(feature = "ts", ts(export))]
20048pub struct MISSION_ACK_DATA {
20049    #[doc = "System ID"]
20050    pub target_system: u8,
20051    #[doc = "Component ID"]
20052    pub target_component: u8,
20053    #[doc = "Mission result."]
20054    pub mavtype: MavMissionResult,
20055    #[doc = "Mission type."]
20056    #[cfg_attr(feature = "serde", serde(default))]
20057    pub mission_type: MavMissionType,
20058    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20059    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20060    pub opaque_id: u32,
20061}
20062impl MISSION_ACK_DATA {
20063    pub const ENCODED_LEN: usize = 8usize;
20064    pub const DEFAULT: Self = Self {
20065        target_system: 0_u8,
20066        target_component: 0_u8,
20067        mavtype: MavMissionResult::DEFAULT,
20068        mission_type: MavMissionType::DEFAULT,
20069        opaque_id: 0_u32,
20070    };
20071    #[cfg(feature = "arbitrary")]
20072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20073        use arbitrary::{Arbitrary, Unstructured};
20074        let mut buf = [0u8; 1024];
20075        rng.fill_bytes(&mut buf);
20076        let mut unstructured = Unstructured::new(&buf);
20077        Self::arbitrary(&mut unstructured).unwrap_or_default()
20078    }
20079}
20080impl Default for MISSION_ACK_DATA {
20081    fn default() -> Self {
20082        Self::DEFAULT.clone()
20083    }
20084}
20085impl MessageData for MISSION_ACK_DATA {
20086    type Message = MavMessage;
20087    const ID: u32 = 47u32;
20088    const NAME: &'static str = "MISSION_ACK";
20089    const EXTRA_CRC: u8 = 153u8;
20090    const ENCODED_LEN: usize = 8usize;
20091    fn deser(
20092        _version: MavlinkVersion,
20093        __input: &[u8],
20094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20095        let avail_len = __input.len();
20096        let mut payload_buf = [0; Self::ENCODED_LEN];
20097        let mut buf = if avail_len < Self::ENCODED_LEN {
20098            payload_buf[0..avail_len].copy_from_slice(__input);
20099            Bytes::new(&payload_buf)
20100        } else {
20101            Bytes::new(__input)
20102        };
20103        let mut __struct = Self::default();
20104        __struct.target_system = buf.get_u8();
20105        __struct.target_component = buf.get_u8();
20106        let tmp = buf.get_u8();
20107        __struct.mavtype =
20108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20109                enum_type: "MavMissionResult",
20110                value: tmp as u64,
20111            })?;
20112        let tmp = buf.get_u8();
20113        __struct.mission_type =
20114            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20115                enum_type: "MavMissionType",
20116                value: tmp as u64,
20117            })?;
20118        __struct.opaque_id = buf.get_u32_le();
20119        Ok(__struct)
20120    }
20121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20122        let mut __tmp = BytesMut::new(bytes);
20123        #[allow(clippy::absurd_extreme_comparisons)]
20124        #[allow(unused_comparisons)]
20125        if __tmp.remaining() < Self::ENCODED_LEN {
20126            panic!(
20127                "buffer is too small (need {} bytes, but got {})",
20128                Self::ENCODED_LEN,
20129                __tmp.remaining(),
20130            )
20131        }
20132        __tmp.put_u8(self.target_system);
20133        __tmp.put_u8(self.target_component);
20134        __tmp.put_u8(self.mavtype as u8);
20135        if matches!(version, MavlinkVersion::V2) {
20136            __tmp.put_u8(self.mission_type as u8);
20137            __tmp.put_u32_le(self.opaque_id);
20138            let len = __tmp.len();
20139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20140        } else {
20141            __tmp.len()
20142        }
20143    }
20144}
20145#[doc = "Delete all mission items at once."]
20146#[doc = ""]
20147#[doc = "ID: 45"]
20148#[derive(Debug, Clone, PartialEq)]
20149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20151#[cfg_attr(feature = "ts", derive(TS))]
20152#[cfg_attr(feature = "ts", ts(export))]
20153pub struct MISSION_CLEAR_ALL_DATA {
20154    #[doc = "System ID"]
20155    pub target_system: u8,
20156    #[doc = "Component ID"]
20157    pub target_component: u8,
20158    #[doc = "Mission type."]
20159    #[cfg_attr(feature = "serde", serde(default))]
20160    pub mission_type: MavMissionType,
20161}
20162impl MISSION_CLEAR_ALL_DATA {
20163    pub const ENCODED_LEN: usize = 3usize;
20164    pub const DEFAULT: Self = Self {
20165        target_system: 0_u8,
20166        target_component: 0_u8,
20167        mission_type: MavMissionType::DEFAULT,
20168    };
20169    #[cfg(feature = "arbitrary")]
20170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20171        use arbitrary::{Arbitrary, Unstructured};
20172        let mut buf = [0u8; 1024];
20173        rng.fill_bytes(&mut buf);
20174        let mut unstructured = Unstructured::new(&buf);
20175        Self::arbitrary(&mut unstructured).unwrap_or_default()
20176    }
20177}
20178impl Default for MISSION_CLEAR_ALL_DATA {
20179    fn default() -> Self {
20180        Self::DEFAULT.clone()
20181    }
20182}
20183impl MessageData for MISSION_CLEAR_ALL_DATA {
20184    type Message = MavMessage;
20185    const ID: u32 = 45u32;
20186    const NAME: &'static str = "MISSION_CLEAR_ALL";
20187    const EXTRA_CRC: u8 = 232u8;
20188    const ENCODED_LEN: usize = 3usize;
20189    fn deser(
20190        _version: MavlinkVersion,
20191        __input: &[u8],
20192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20193        let avail_len = __input.len();
20194        let mut payload_buf = [0; Self::ENCODED_LEN];
20195        let mut buf = if avail_len < Self::ENCODED_LEN {
20196            payload_buf[0..avail_len].copy_from_slice(__input);
20197            Bytes::new(&payload_buf)
20198        } else {
20199            Bytes::new(__input)
20200        };
20201        let mut __struct = Self::default();
20202        __struct.target_system = buf.get_u8();
20203        __struct.target_component = buf.get_u8();
20204        let tmp = buf.get_u8();
20205        __struct.mission_type =
20206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20207                enum_type: "MavMissionType",
20208                value: tmp as u64,
20209            })?;
20210        Ok(__struct)
20211    }
20212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20213        let mut __tmp = BytesMut::new(bytes);
20214        #[allow(clippy::absurd_extreme_comparisons)]
20215        #[allow(unused_comparisons)]
20216        if __tmp.remaining() < Self::ENCODED_LEN {
20217            panic!(
20218                "buffer is too small (need {} bytes, but got {})",
20219                Self::ENCODED_LEN,
20220                __tmp.remaining(),
20221            )
20222        }
20223        __tmp.put_u8(self.target_system);
20224        __tmp.put_u8(self.target_component);
20225        if matches!(version, MavlinkVersion::V2) {
20226            __tmp.put_u8(self.mission_type as u8);
20227            let len = __tmp.len();
20228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20229        } else {
20230            __tmp.len()
20231        }
20232    }
20233}
20234#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20235#[doc = ""]
20236#[doc = "ID: 44"]
20237#[derive(Debug, Clone, PartialEq)]
20238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20240#[cfg_attr(feature = "ts", derive(TS))]
20241#[cfg_attr(feature = "ts", ts(export))]
20242pub struct MISSION_COUNT_DATA {
20243    #[doc = "Number of mission items in the sequence"]
20244    pub count: u16,
20245    #[doc = "System ID"]
20246    pub target_system: u8,
20247    #[doc = "Component ID"]
20248    pub target_component: u8,
20249    #[doc = "Mission type."]
20250    #[cfg_attr(feature = "serde", serde(default))]
20251    pub mission_type: MavMissionType,
20252    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20254    pub opaque_id: u32,
20255}
20256impl MISSION_COUNT_DATA {
20257    pub const ENCODED_LEN: usize = 9usize;
20258    pub const DEFAULT: Self = Self {
20259        count: 0_u16,
20260        target_system: 0_u8,
20261        target_component: 0_u8,
20262        mission_type: MavMissionType::DEFAULT,
20263        opaque_id: 0_u32,
20264    };
20265    #[cfg(feature = "arbitrary")]
20266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20267        use arbitrary::{Arbitrary, Unstructured};
20268        let mut buf = [0u8; 1024];
20269        rng.fill_bytes(&mut buf);
20270        let mut unstructured = Unstructured::new(&buf);
20271        Self::arbitrary(&mut unstructured).unwrap_or_default()
20272    }
20273}
20274impl Default for MISSION_COUNT_DATA {
20275    fn default() -> Self {
20276        Self::DEFAULT.clone()
20277    }
20278}
20279impl MessageData for MISSION_COUNT_DATA {
20280    type Message = MavMessage;
20281    const ID: u32 = 44u32;
20282    const NAME: &'static str = "MISSION_COUNT";
20283    const EXTRA_CRC: u8 = 221u8;
20284    const ENCODED_LEN: usize = 9usize;
20285    fn deser(
20286        _version: MavlinkVersion,
20287        __input: &[u8],
20288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20289        let avail_len = __input.len();
20290        let mut payload_buf = [0; Self::ENCODED_LEN];
20291        let mut buf = if avail_len < Self::ENCODED_LEN {
20292            payload_buf[0..avail_len].copy_from_slice(__input);
20293            Bytes::new(&payload_buf)
20294        } else {
20295            Bytes::new(__input)
20296        };
20297        let mut __struct = Self::default();
20298        __struct.count = buf.get_u16_le();
20299        __struct.target_system = buf.get_u8();
20300        __struct.target_component = buf.get_u8();
20301        let tmp = buf.get_u8();
20302        __struct.mission_type =
20303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20304                enum_type: "MavMissionType",
20305                value: tmp as u64,
20306            })?;
20307        __struct.opaque_id = buf.get_u32_le();
20308        Ok(__struct)
20309    }
20310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20311        let mut __tmp = BytesMut::new(bytes);
20312        #[allow(clippy::absurd_extreme_comparisons)]
20313        #[allow(unused_comparisons)]
20314        if __tmp.remaining() < Self::ENCODED_LEN {
20315            panic!(
20316                "buffer is too small (need {} bytes, but got {})",
20317                Self::ENCODED_LEN,
20318                __tmp.remaining(),
20319            )
20320        }
20321        __tmp.put_u16_le(self.count);
20322        __tmp.put_u8(self.target_system);
20323        __tmp.put_u8(self.target_component);
20324        if matches!(version, MavlinkVersion::V2) {
20325            __tmp.put_u8(self.mission_type as u8);
20326            __tmp.put_u32_le(self.opaque_id);
20327            let len = __tmp.len();
20328            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20329        } else {
20330            __tmp.len()
20331        }
20332    }
20333}
20334#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20335#[doc = ""]
20336#[doc = "ID: 42"]
20337#[derive(Debug, Clone, PartialEq)]
20338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20340#[cfg_attr(feature = "ts", derive(TS))]
20341#[cfg_attr(feature = "ts", ts(export))]
20342pub struct MISSION_CURRENT_DATA {
20343    #[doc = "Sequence"]
20344    pub seq: u16,
20345    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20347    pub total: u16,
20348    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20349    #[cfg_attr(feature = "serde", serde(default))]
20350    pub mission_state: MissionState,
20351    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20353    pub mission_mode: u8,
20354    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20356    pub mission_id: u32,
20357    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20359    pub fence_id: u32,
20360    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20362    pub rally_points_id: u32,
20363}
20364impl MISSION_CURRENT_DATA {
20365    pub const ENCODED_LEN: usize = 18usize;
20366    pub const DEFAULT: Self = Self {
20367        seq: 0_u16,
20368        total: 0_u16,
20369        mission_state: MissionState::DEFAULT,
20370        mission_mode: 0_u8,
20371        mission_id: 0_u32,
20372        fence_id: 0_u32,
20373        rally_points_id: 0_u32,
20374    };
20375    #[cfg(feature = "arbitrary")]
20376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20377        use arbitrary::{Arbitrary, Unstructured};
20378        let mut buf = [0u8; 1024];
20379        rng.fill_bytes(&mut buf);
20380        let mut unstructured = Unstructured::new(&buf);
20381        Self::arbitrary(&mut unstructured).unwrap_or_default()
20382    }
20383}
20384impl Default for MISSION_CURRENT_DATA {
20385    fn default() -> Self {
20386        Self::DEFAULT.clone()
20387    }
20388}
20389impl MessageData for MISSION_CURRENT_DATA {
20390    type Message = MavMessage;
20391    const ID: u32 = 42u32;
20392    const NAME: &'static str = "MISSION_CURRENT";
20393    const EXTRA_CRC: u8 = 28u8;
20394    const ENCODED_LEN: usize = 18usize;
20395    fn deser(
20396        _version: MavlinkVersion,
20397        __input: &[u8],
20398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20399        let avail_len = __input.len();
20400        let mut payload_buf = [0; Self::ENCODED_LEN];
20401        let mut buf = if avail_len < Self::ENCODED_LEN {
20402            payload_buf[0..avail_len].copy_from_slice(__input);
20403            Bytes::new(&payload_buf)
20404        } else {
20405            Bytes::new(__input)
20406        };
20407        let mut __struct = Self::default();
20408        __struct.seq = buf.get_u16_le();
20409        __struct.total = buf.get_u16_le();
20410        let tmp = buf.get_u8();
20411        __struct.mission_state =
20412            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20413                enum_type: "MissionState",
20414                value: tmp as u64,
20415            })?;
20416        __struct.mission_mode = buf.get_u8();
20417        __struct.mission_id = buf.get_u32_le();
20418        __struct.fence_id = buf.get_u32_le();
20419        __struct.rally_points_id = buf.get_u32_le();
20420        Ok(__struct)
20421    }
20422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20423        let mut __tmp = BytesMut::new(bytes);
20424        #[allow(clippy::absurd_extreme_comparisons)]
20425        #[allow(unused_comparisons)]
20426        if __tmp.remaining() < Self::ENCODED_LEN {
20427            panic!(
20428                "buffer is too small (need {} bytes, but got {})",
20429                Self::ENCODED_LEN,
20430                __tmp.remaining(),
20431            )
20432        }
20433        __tmp.put_u16_le(self.seq);
20434        if matches!(version, MavlinkVersion::V2) {
20435            __tmp.put_u16_le(self.total);
20436            __tmp.put_u8(self.mission_state as u8);
20437            __tmp.put_u8(self.mission_mode);
20438            __tmp.put_u32_le(self.mission_id);
20439            __tmp.put_u32_le(self.fence_id);
20440            __tmp.put_u32_le(self.rally_points_id);
20441            let len = __tmp.len();
20442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20443        } else {
20444            __tmp.len()
20445        }
20446    }
20447}
20448#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20449#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20450#[doc = ""]
20451#[doc = "ID: 39"]
20452#[derive(Debug, Clone, PartialEq)]
20453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20455#[cfg_attr(feature = "ts", derive(TS))]
20456#[cfg_attr(feature = "ts", ts(export))]
20457pub struct MISSION_ITEM_DATA {
20458    #[doc = "PARAM1, see MAV_CMD enum"]
20459    pub param1: f32,
20460    #[doc = "PARAM2, see MAV_CMD enum"]
20461    pub param2: f32,
20462    #[doc = "PARAM3, see MAV_CMD enum"]
20463    pub param3: f32,
20464    #[doc = "PARAM4, see MAV_CMD enum"]
20465    pub param4: f32,
20466    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20467    pub x: f32,
20468    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20469    pub y: f32,
20470    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20471    pub z: f32,
20472    #[doc = "Sequence"]
20473    pub seq: u16,
20474    #[doc = "The scheduled action for the waypoint."]
20475    pub command: MavCmd,
20476    #[doc = "System ID"]
20477    pub target_system: u8,
20478    #[doc = "Component ID"]
20479    pub target_component: u8,
20480    #[doc = "The coordinate system of the waypoint."]
20481    pub frame: MavFrame,
20482    #[doc = "false:0, true:1"]
20483    pub current: u8,
20484    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20485    pub autocontinue: u8,
20486    #[doc = "Mission type."]
20487    #[cfg_attr(feature = "serde", serde(default))]
20488    pub mission_type: MavMissionType,
20489}
20490impl MISSION_ITEM_DATA {
20491    pub const ENCODED_LEN: usize = 38usize;
20492    pub const DEFAULT: Self = Self {
20493        param1: 0.0_f32,
20494        param2: 0.0_f32,
20495        param3: 0.0_f32,
20496        param4: 0.0_f32,
20497        x: 0.0_f32,
20498        y: 0.0_f32,
20499        z: 0.0_f32,
20500        seq: 0_u16,
20501        command: MavCmd::DEFAULT,
20502        target_system: 0_u8,
20503        target_component: 0_u8,
20504        frame: MavFrame::DEFAULT,
20505        current: 0_u8,
20506        autocontinue: 0_u8,
20507        mission_type: MavMissionType::DEFAULT,
20508    };
20509    #[cfg(feature = "arbitrary")]
20510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20511        use arbitrary::{Arbitrary, Unstructured};
20512        let mut buf = [0u8; 1024];
20513        rng.fill_bytes(&mut buf);
20514        let mut unstructured = Unstructured::new(&buf);
20515        Self::arbitrary(&mut unstructured).unwrap_or_default()
20516    }
20517}
20518impl Default for MISSION_ITEM_DATA {
20519    fn default() -> Self {
20520        Self::DEFAULT.clone()
20521    }
20522}
20523impl MessageData for MISSION_ITEM_DATA {
20524    type Message = MavMessage;
20525    const ID: u32 = 39u32;
20526    const NAME: &'static str = "MISSION_ITEM";
20527    const EXTRA_CRC: u8 = 254u8;
20528    const ENCODED_LEN: usize = 38usize;
20529    fn deser(
20530        _version: MavlinkVersion,
20531        __input: &[u8],
20532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20533        let avail_len = __input.len();
20534        let mut payload_buf = [0; Self::ENCODED_LEN];
20535        let mut buf = if avail_len < Self::ENCODED_LEN {
20536            payload_buf[0..avail_len].copy_from_slice(__input);
20537            Bytes::new(&payload_buf)
20538        } else {
20539            Bytes::new(__input)
20540        };
20541        let mut __struct = Self::default();
20542        __struct.param1 = buf.get_f32_le();
20543        __struct.param2 = buf.get_f32_le();
20544        __struct.param3 = buf.get_f32_le();
20545        __struct.param4 = buf.get_f32_le();
20546        __struct.x = buf.get_f32_le();
20547        __struct.y = buf.get_f32_le();
20548        __struct.z = buf.get_f32_le();
20549        __struct.seq = buf.get_u16_le();
20550        let tmp = buf.get_u16_le();
20551        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20552            ::mavlink_core::error::ParserError::InvalidEnum {
20553                enum_type: "MavCmd",
20554                value: tmp as u64,
20555            },
20556        )?;
20557        __struct.target_system = buf.get_u8();
20558        __struct.target_component = buf.get_u8();
20559        let tmp = buf.get_u8();
20560        __struct.frame =
20561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20562                enum_type: "MavFrame",
20563                value: tmp as u64,
20564            })?;
20565        __struct.current = buf.get_u8();
20566        __struct.autocontinue = buf.get_u8();
20567        let tmp = buf.get_u8();
20568        __struct.mission_type =
20569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20570                enum_type: "MavMissionType",
20571                value: tmp as u64,
20572            })?;
20573        Ok(__struct)
20574    }
20575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20576        let mut __tmp = BytesMut::new(bytes);
20577        #[allow(clippy::absurd_extreme_comparisons)]
20578        #[allow(unused_comparisons)]
20579        if __tmp.remaining() < Self::ENCODED_LEN {
20580            panic!(
20581                "buffer is too small (need {} bytes, but got {})",
20582                Self::ENCODED_LEN,
20583                __tmp.remaining(),
20584            )
20585        }
20586        __tmp.put_f32_le(self.param1);
20587        __tmp.put_f32_le(self.param2);
20588        __tmp.put_f32_le(self.param3);
20589        __tmp.put_f32_le(self.param4);
20590        __tmp.put_f32_le(self.x);
20591        __tmp.put_f32_le(self.y);
20592        __tmp.put_f32_le(self.z);
20593        __tmp.put_u16_le(self.seq);
20594        __tmp.put_u16_le(self.command as u16);
20595        __tmp.put_u8(self.target_system);
20596        __tmp.put_u8(self.target_component);
20597        __tmp.put_u8(self.frame as u8);
20598        __tmp.put_u8(self.current);
20599        __tmp.put_u8(self.autocontinue);
20600        if matches!(version, MavlinkVersion::V2) {
20601            __tmp.put_u8(self.mission_type as u8);
20602            let len = __tmp.len();
20603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20604        } else {
20605            __tmp.len()
20606        }
20607    }
20608}
20609#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20610#[doc = ""]
20611#[doc = "ID: 73"]
20612#[derive(Debug, Clone, PartialEq)]
20613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20615#[cfg_attr(feature = "ts", derive(TS))]
20616#[cfg_attr(feature = "ts", ts(export))]
20617pub struct MISSION_ITEM_INT_DATA {
20618    #[doc = "PARAM1, see MAV_CMD enum"]
20619    pub param1: f32,
20620    #[doc = "PARAM2, see MAV_CMD enum"]
20621    pub param2: f32,
20622    #[doc = "PARAM3, see MAV_CMD enum"]
20623    pub param3: f32,
20624    #[doc = "PARAM4, see MAV_CMD enum"]
20625    pub param4: f32,
20626    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20627    pub x: i32,
20628    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20629    pub y: i32,
20630    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20631    pub z: f32,
20632    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20633    pub seq: u16,
20634    #[doc = "The scheduled action for the waypoint."]
20635    pub command: MavCmd,
20636    #[doc = "System ID"]
20637    pub target_system: u8,
20638    #[doc = "Component ID"]
20639    pub target_component: u8,
20640    #[doc = "The coordinate system of the waypoint."]
20641    pub frame: MavFrame,
20642    #[doc = "false:0, true:1"]
20643    pub current: u8,
20644    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20645    pub autocontinue: u8,
20646    #[doc = "Mission type."]
20647    #[cfg_attr(feature = "serde", serde(default))]
20648    pub mission_type: MavMissionType,
20649}
20650impl MISSION_ITEM_INT_DATA {
20651    pub const ENCODED_LEN: usize = 38usize;
20652    pub const DEFAULT: Self = Self {
20653        param1: 0.0_f32,
20654        param2: 0.0_f32,
20655        param3: 0.0_f32,
20656        param4: 0.0_f32,
20657        x: 0_i32,
20658        y: 0_i32,
20659        z: 0.0_f32,
20660        seq: 0_u16,
20661        command: MavCmd::DEFAULT,
20662        target_system: 0_u8,
20663        target_component: 0_u8,
20664        frame: MavFrame::DEFAULT,
20665        current: 0_u8,
20666        autocontinue: 0_u8,
20667        mission_type: MavMissionType::DEFAULT,
20668    };
20669    #[cfg(feature = "arbitrary")]
20670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20671        use arbitrary::{Arbitrary, Unstructured};
20672        let mut buf = [0u8; 1024];
20673        rng.fill_bytes(&mut buf);
20674        let mut unstructured = Unstructured::new(&buf);
20675        Self::arbitrary(&mut unstructured).unwrap_or_default()
20676    }
20677}
20678impl Default for MISSION_ITEM_INT_DATA {
20679    fn default() -> Self {
20680        Self::DEFAULT.clone()
20681    }
20682}
20683impl MessageData for MISSION_ITEM_INT_DATA {
20684    type Message = MavMessage;
20685    const ID: u32 = 73u32;
20686    const NAME: &'static str = "MISSION_ITEM_INT";
20687    const EXTRA_CRC: u8 = 38u8;
20688    const ENCODED_LEN: usize = 38usize;
20689    fn deser(
20690        _version: MavlinkVersion,
20691        __input: &[u8],
20692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20693        let avail_len = __input.len();
20694        let mut payload_buf = [0; Self::ENCODED_LEN];
20695        let mut buf = if avail_len < Self::ENCODED_LEN {
20696            payload_buf[0..avail_len].copy_from_slice(__input);
20697            Bytes::new(&payload_buf)
20698        } else {
20699            Bytes::new(__input)
20700        };
20701        let mut __struct = Self::default();
20702        __struct.param1 = buf.get_f32_le();
20703        __struct.param2 = buf.get_f32_le();
20704        __struct.param3 = buf.get_f32_le();
20705        __struct.param4 = buf.get_f32_le();
20706        __struct.x = buf.get_i32_le();
20707        __struct.y = buf.get_i32_le();
20708        __struct.z = buf.get_f32_le();
20709        __struct.seq = buf.get_u16_le();
20710        let tmp = buf.get_u16_le();
20711        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20712            ::mavlink_core::error::ParserError::InvalidEnum {
20713                enum_type: "MavCmd",
20714                value: tmp as u64,
20715            },
20716        )?;
20717        __struct.target_system = buf.get_u8();
20718        __struct.target_component = buf.get_u8();
20719        let tmp = buf.get_u8();
20720        __struct.frame =
20721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20722                enum_type: "MavFrame",
20723                value: tmp as u64,
20724            })?;
20725        __struct.current = buf.get_u8();
20726        __struct.autocontinue = buf.get_u8();
20727        let tmp = buf.get_u8();
20728        __struct.mission_type =
20729            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20730                enum_type: "MavMissionType",
20731                value: tmp as u64,
20732            })?;
20733        Ok(__struct)
20734    }
20735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20736        let mut __tmp = BytesMut::new(bytes);
20737        #[allow(clippy::absurd_extreme_comparisons)]
20738        #[allow(unused_comparisons)]
20739        if __tmp.remaining() < Self::ENCODED_LEN {
20740            panic!(
20741                "buffer is too small (need {} bytes, but got {})",
20742                Self::ENCODED_LEN,
20743                __tmp.remaining(),
20744            )
20745        }
20746        __tmp.put_f32_le(self.param1);
20747        __tmp.put_f32_le(self.param2);
20748        __tmp.put_f32_le(self.param3);
20749        __tmp.put_f32_le(self.param4);
20750        __tmp.put_i32_le(self.x);
20751        __tmp.put_i32_le(self.y);
20752        __tmp.put_f32_le(self.z);
20753        __tmp.put_u16_le(self.seq);
20754        __tmp.put_u16_le(self.command as u16);
20755        __tmp.put_u8(self.target_system);
20756        __tmp.put_u8(self.target_component);
20757        __tmp.put_u8(self.frame as u8);
20758        __tmp.put_u8(self.current);
20759        __tmp.put_u8(self.autocontinue);
20760        if matches!(version, MavlinkVersion::V2) {
20761            __tmp.put_u8(self.mission_type as u8);
20762            let len = __tmp.len();
20763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20764        } else {
20765            __tmp.len()
20766        }
20767    }
20768}
20769#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20770#[doc = ""]
20771#[doc = "ID: 46"]
20772#[derive(Debug, Clone, PartialEq)]
20773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20775#[cfg_attr(feature = "ts", derive(TS))]
20776#[cfg_attr(feature = "ts", ts(export))]
20777pub struct MISSION_ITEM_REACHED_DATA {
20778    #[doc = "Sequence"]
20779    pub seq: u16,
20780}
20781impl MISSION_ITEM_REACHED_DATA {
20782    pub const ENCODED_LEN: usize = 2usize;
20783    pub const DEFAULT: Self = Self { seq: 0_u16 };
20784    #[cfg(feature = "arbitrary")]
20785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20786        use arbitrary::{Arbitrary, Unstructured};
20787        let mut buf = [0u8; 1024];
20788        rng.fill_bytes(&mut buf);
20789        let mut unstructured = Unstructured::new(&buf);
20790        Self::arbitrary(&mut unstructured).unwrap_or_default()
20791    }
20792}
20793impl Default for MISSION_ITEM_REACHED_DATA {
20794    fn default() -> Self {
20795        Self::DEFAULT.clone()
20796    }
20797}
20798impl MessageData for MISSION_ITEM_REACHED_DATA {
20799    type Message = MavMessage;
20800    const ID: u32 = 46u32;
20801    const NAME: &'static str = "MISSION_ITEM_REACHED";
20802    const EXTRA_CRC: u8 = 11u8;
20803    const ENCODED_LEN: usize = 2usize;
20804    fn deser(
20805        _version: MavlinkVersion,
20806        __input: &[u8],
20807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20808        let avail_len = __input.len();
20809        let mut payload_buf = [0; Self::ENCODED_LEN];
20810        let mut buf = if avail_len < Self::ENCODED_LEN {
20811            payload_buf[0..avail_len].copy_from_slice(__input);
20812            Bytes::new(&payload_buf)
20813        } else {
20814            Bytes::new(__input)
20815        };
20816        let mut __struct = Self::default();
20817        __struct.seq = buf.get_u16_le();
20818        Ok(__struct)
20819    }
20820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20821        let mut __tmp = BytesMut::new(bytes);
20822        #[allow(clippy::absurd_extreme_comparisons)]
20823        #[allow(unused_comparisons)]
20824        if __tmp.remaining() < Self::ENCODED_LEN {
20825            panic!(
20826                "buffer is too small (need {} bytes, but got {})",
20827                Self::ENCODED_LEN,
20828                __tmp.remaining(),
20829            )
20830        }
20831        __tmp.put_u16_le(self.seq);
20832        if matches!(version, MavlinkVersion::V2) {
20833            let len = __tmp.len();
20834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20835        } else {
20836            __tmp.len()
20837        }
20838    }
20839}
20840#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20841#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20842#[doc = ""]
20843#[doc = "ID: 40"]
20844#[derive(Debug, Clone, PartialEq)]
20845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20847#[cfg_attr(feature = "ts", derive(TS))]
20848#[cfg_attr(feature = "ts", ts(export))]
20849pub struct MISSION_REQUEST_DATA {
20850    #[doc = "Sequence"]
20851    pub seq: u16,
20852    #[doc = "System ID"]
20853    pub target_system: u8,
20854    #[doc = "Component ID"]
20855    pub target_component: u8,
20856    #[doc = "Mission type."]
20857    #[cfg_attr(feature = "serde", serde(default))]
20858    pub mission_type: MavMissionType,
20859}
20860impl MISSION_REQUEST_DATA {
20861    pub const ENCODED_LEN: usize = 5usize;
20862    pub const DEFAULT: Self = Self {
20863        seq: 0_u16,
20864        target_system: 0_u8,
20865        target_component: 0_u8,
20866        mission_type: MavMissionType::DEFAULT,
20867    };
20868    #[cfg(feature = "arbitrary")]
20869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20870        use arbitrary::{Arbitrary, Unstructured};
20871        let mut buf = [0u8; 1024];
20872        rng.fill_bytes(&mut buf);
20873        let mut unstructured = Unstructured::new(&buf);
20874        Self::arbitrary(&mut unstructured).unwrap_or_default()
20875    }
20876}
20877impl Default for MISSION_REQUEST_DATA {
20878    fn default() -> Self {
20879        Self::DEFAULT.clone()
20880    }
20881}
20882impl MessageData for MISSION_REQUEST_DATA {
20883    type Message = MavMessage;
20884    const ID: u32 = 40u32;
20885    const NAME: &'static str = "MISSION_REQUEST";
20886    const EXTRA_CRC: u8 = 230u8;
20887    const ENCODED_LEN: usize = 5usize;
20888    fn deser(
20889        _version: MavlinkVersion,
20890        __input: &[u8],
20891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20892        let avail_len = __input.len();
20893        let mut payload_buf = [0; Self::ENCODED_LEN];
20894        let mut buf = if avail_len < Self::ENCODED_LEN {
20895            payload_buf[0..avail_len].copy_from_slice(__input);
20896            Bytes::new(&payload_buf)
20897        } else {
20898            Bytes::new(__input)
20899        };
20900        let mut __struct = Self::default();
20901        __struct.seq = buf.get_u16_le();
20902        __struct.target_system = buf.get_u8();
20903        __struct.target_component = buf.get_u8();
20904        let tmp = buf.get_u8();
20905        __struct.mission_type =
20906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20907                enum_type: "MavMissionType",
20908                value: tmp as u64,
20909            })?;
20910        Ok(__struct)
20911    }
20912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20913        let mut __tmp = BytesMut::new(bytes);
20914        #[allow(clippy::absurd_extreme_comparisons)]
20915        #[allow(unused_comparisons)]
20916        if __tmp.remaining() < Self::ENCODED_LEN {
20917            panic!(
20918                "buffer is too small (need {} bytes, but got {})",
20919                Self::ENCODED_LEN,
20920                __tmp.remaining(),
20921            )
20922        }
20923        __tmp.put_u16_le(self.seq);
20924        __tmp.put_u8(self.target_system);
20925        __tmp.put_u8(self.target_component);
20926        if matches!(version, MavlinkVersion::V2) {
20927            __tmp.put_u8(self.mission_type as u8);
20928            let len = __tmp.len();
20929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20930        } else {
20931            __tmp.len()
20932        }
20933    }
20934}
20935#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20936#[doc = ""]
20937#[doc = "ID: 51"]
20938#[derive(Debug, Clone, PartialEq)]
20939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20941#[cfg_attr(feature = "ts", derive(TS))]
20942#[cfg_attr(feature = "ts", ts(export))]
20943pub struct MISSION_REQUEST_INT_DATA {
20944    #[doc = "Sequence"]
20945    pub seq: u16,
20946    #[doc = "System ID"]
20947    pub target_system: u8,
20948    #[doc = "Component ID"]
20949    pub target_component: u8,
20950    #[doc = "Mission type."]
20951    #[cfg_attr(feature = "serde", serde(default))]
20952    pub mission_type: MavMissionType,
20953}
20954impl MISSION_REQUEST_INT_DATA {
20955    pub const ENCODED_LEN: usize = 5usize;
20956    pub const DEFAULT: Self = Self {
20957        seq: 0_u16,
20958        target_system: 0_u8,
20959        target_component: 0_u8,
20960        mission_type: MavMissionType::DEFAULT,
20961    };
20962    #[cfg(feature = "arbitrary")]
20963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20964        use arbitrary::{Arbitrary, Unstructured};
20965        let mut buf = [0u8; 1024];
20966        rng.fill_bytes(&mut buf);
20967        let mut unstructured = Unstructured::new(&buf);
20968        Self::arbitrary(&mut unstructured).unwrap_or_default()
20969    }
20970}
20971impl Default for MISSION_REQUEST_INT_DATA {
20972    fn default() -> Self {
20973        Self::DEFAULT.clone()
20974    }
20975}
20976impl MessageData for MISSION_REQUEST_INT_DATA {
20977    type Message = MavMessage;
20978    const ID: u32 = 51u32;
20979    const NAME: &'static str = "MISSION_REQUEST_INT";
20980    const EXTRA_CRC: u8 = 196u8;
20981    const ENCODED_LEN: usize = 5usize;
20982    fn deser(
20983        _version: MavlinkVersion,
20984        __input: &[u8],
20985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20986        let avail_len = __input.len();
20987        let mut payload_buf = [0; Self::ENCODED_LEN];
20988        let mut buf = if avail_len < Self::ENCODED_LEN {
20989            payload_buf[0..avail_len].copy_from_slice(__input);
20990            Bytes::new(&payload_buf)
20991        } else {
20992            Bytes::new(__input)
20993        };
20994        let mut __struct = Self::default();
20995        __struct.seq = buf.get_u16_le();
20996        __struct.target_system = buf.get_u8();
20997        __struct.target_component = buf.get_u8();
20998        let tmp = buf.get_u8();
20999        __struct.mission_type =
21000            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21001                enum_type: "MavMissionType",
21002                value: tmp as u64,
21003            })?;
21004        Ok(__struct)
21005    }
21006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21007        let mut __tmp = BytesMut::new(bytes);
21008        #[allow(clippy::absurd_extreme_comparisons)]
21009        #[allow(unused_comparisons)]
21010        if __tmp.remaining() < Self::ENCODED_LEN {
21011            panic!(
21012                "buffer is too small (need {} bytes, but got {})",
21013                Self::ENCODED_LEN,
21014                __tmp.remaining(),
21015            )
21016        }
21017        __tmp.put_u16_le(self.seq);
21018        __tmp.put_u8(self.target_system);
21019        __tmp.put_u8(self.target_component);
21020        if matches!(version, MavlinkVersion::V2) {
21021            __tmp.put_u8(self.mission_type as u8);
21022            let len = __tmp.len();
21023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21024        } else {
21025            __tmp.len()
21026        }
21027    }
21028}
21029#[doc = "Request the overall list of mission items from the system/component."]
21030#[doc = ""]
21031#[doc = "ID: 43"]
21032#[derive(Debug, Clone, PartialEq)]
21033#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21035#[cfg_attr(feature = "ts", derive(TS))]
21036#[cfg_attr(feature = "ts", ts(export))]
21037pub struct MISSION_REQUEST_LIST_DATA {
21038    #[doc = "System ID"]
21039    pub target_system: u8,
21040    #[doc = "Component ID"]
21041    pub target_component: u8,
21042    #[doc = "Mission type."]
21043    #[cfg_attr(feature = "serde", serde(default))]
21044    pub mission_type: MavMissionType,
21045}
21046impl MISSION_REQUEST_LIST_DATA {
21047    pub const ENCODED_LEN: usize = 3usize;
21048    pub const DEFAULT: Self = Self {
21049        target_system: 0_u8,
21050        target_component: 0_u8,
21051        mission_type: MavMissionType::DEFAULT,
21052    };
21053    #[cfg(feature = "arbitrary")]
21054    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21055        use arbitrary::{Arbitrary, Unstructured};
21056        let mut buf = [0u8; 1024];
21057        rng.fill_bytes(&mut buf);
21058        let mut unstructured = Unstructured::new(&buf);
21059        Self::arbitrary(&mut unstructured).unwrap_or_default()
21060    }
21061}
21062impl Default for MISSION_REQUEST_LIST_DATA {
21063    fn default() -> Self {
21064        Self::DEFAULT.clone()
21065    }
21066}
21067impl MessageData for MISSION_REQUEST_LIST_DATA {
21068    type Message = MavMessage;
21069    const ID: u32 = 43u32;
21070    const NAME: &'static str = "MISSION_REQUEST_LIST";
21071    const EXTRA_CRC: u8 = 132u8;
21072    const ENCODED_LEN: usize = 3usize;
21073    fn deser(
21074        _version: MavlinkVersion,
21075        __input: &[u8],
21076    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21077        let avail_len = __input.len();
21078        let mut payload_buf = [0; Self::ENCODED_LEN];
21079        let mut buf = if avail_len < Self::ENCODED_LEN {
21080            payload_buf[0..avail_len].copy_from_slice(__input);
21081            Bytes::new(&payload_buf)
21082        } else {
21083            Bytes::new(__input)
21084        };
21085        let mut __struct = Self::default();
21086        __struct.target_system = buf.get_u8();
21087        __struct.target_component = buf.get_u8();
21088        let tmp = buf.get_u8();
21089        __struct.mission_type =
21090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21091                enum_type: "MavMissionType",
21092                value: tmp as u64,
21093            })?;
21094        Ok(__struct)
21095    }
21096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21097        let mut __tmp = BytesMut::new(bytes);
21098        #[allow(clippy::absurd_extreme_comparisons)]
21099        #[allow(unused_comparisons)]
21100        if __tmp.remaining() < Self::ENCODED_LEN {
21101            panic!(
21102                "buffer is too small (need {} bytes, but got {})",
21103                Self::ENCODED_LEN,
21104                __tmp.remaining(),
21105            )
21106        }
21107        __tmp.put_u8(self.target_system);
21108        __tmp.put_u8(self.target_component);
21109        if matches!(version, MavlinkVersion::V2) {
21110            __tmp.put_u8(self.mission_type as u8);
21111            let len = __tmp.len();
21112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21113        } else {
21114            __tmp.len()
21115        }
21116    }
21117}
21118#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21119#[doc = ""]
21120#[doc = "ID: 37"]
21121#[derive(Debug, Clone, PartialEq)]
21122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21124#[cfg_attr(feature = "ts", derive(TS))]
21125#[cfg_attr(feature = "ts", ts(export))]
21126pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21127    #[doc = "Start index"]
21128    pub start_index: i16,
21129    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21130    pub end_index: i16,
21131    #[doc = "System ID"]
21132    pub target_system: u8,
21133    #[doc = "Component ID"]
21134    pub target_component: u8,
21135    #[doc = "Mission type."]
21136    #[cfg_attr(feature = "serde", serde(default))]
21137    pub mission_type: MavMissionType,
21138}
21139impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21140    pub const ENCODED_LEN: usize = 7usize;
21141    pub const DEFAULT: Self = Self {
21142        start_index: 0_i16,
21143        end_index: 0_i16,
21144        target_system: 0_u8,
21145        target_component: 0_u8,
21146        mission_type: MavMissionType::DEFAULT,
21147    };
21148    #[cfg(feature = "arbitrary")]
21149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21150        use arbitrary::{Arbitrary, Unstructured};
21151        let mut buf = [0u8; 1024];
21152        rng.fill_bytes(&mut buf);
21153        let mut unstructured = Unstructured::new(&buf);
21154        Self::arbitrary(&mut unstructured).unwrap_or_default()
21155    }
21156}
21157impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21158    fn default() -> Self {
21159        Self::DEFAULT.clone()
21160    }
21161}
21162impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21163    type Message = MavMessage;
21164    const ID: u32 = 37u32;
21165    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21166    const EXTRA_CRC: u8 = 212u8;
21167    const ENCODED_LEN: usize = 7usize;
21168    fn deser(
21169        _version: MavlinkVersion,
21170        __input: &[u8],
21171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21172        let avail_len = __input.len();
21173        let mut payload_buf = [0; Self::ENCODED_LEN];
21174        let mut buf = if avail_len < Self::ENCODED_LEN {
21175            payload_buf[0..avail_len].copy_from_slice(__input);
21176            Bytes::new(&payload_buf)
21177        } else {
21178            Bytes::new(__input)
21179        };
21180        let mut __struct = Self::default();
21181        __struct.start_index = buf.get_i16_le();
21182        __struct.end_index = buf.get_i16_le();
21183        __struct.target_system = buf.get_u8();
21184        __struct.target_component = buf.get_u8();
21185        let tmp = buf.get_u8();
21186        __struct.mission_type =
21187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21188                enum_type: "MavMissionType",
21189                value: tmp as u64,
21190            })?;
21191        Ok(__struct)
21192    }
21193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21194        let mut __tmp = BytesMut::new(bytes);
21195        #[allow(clippy::absurd_extreme_comparisons)]
21196        #[allow(unused_comparisons)]
21197        if __tmp.remaining() < Self::ENCODED_LEN {
21198            panic!(
21199                "buffer is too small (need {} bytes, but got {})",
21200                Self::ENCODED_LEN,
21201                __tmp.remaining(),
21202            )
21203        }
21204        __tmp.put_i16_le(self.start_index);
21205        __tmp.put_i16_le(self.end_index);
21206        __tmp.put_u8(self.target_system);
21207        __tmp.put_u8(self.target_component);
21208        if matches!(version, MavlinkVersion::V2) {
21209            __tmp.put_u8(self.mission_type as u8);
21210            let len = __tmp.len();
21211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21212        } else {
21213            __tmp.len()
21214        }
21215    }
21216}
21217#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21218#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21219#[doc = ""]
21220#[doc = "ID: 41"]
21221#[derive(Debug, Clone, PartialEq)]
21222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21224#[cfg_attr(feature = "ts", derive(TS))]
21225#[cfg_attr(feature = "ts", ts(export))]
21226pub struct MISSION_SET_CURRENT_DATA {
21227    #[doc = "Sequence"]
21228    pub seq: u16,
21229    #[doc = "System ID"]
21230    pub target_system: u8,
21231    #[doc = "Component ID"]
21232    pub target_component: u8,
21233}
21234impl MISSION_SET_CURRENT_DATA {
21235    pub const ENCODED_LEN: usize = 4usize;
21236    pub const DEFAULT: Self = Self {
21237        seq: 0_u16,
21238        target_system: 0_u8,
21239        target_component: 0_u8,
21240    };
21241    #[cfg(feature = "arbitrary")]
21242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21243        use arbitrary::{Arbitrary, Unstructured};
21244        let mut buf = [0u8; 1024];
21245        rng.fill_bytes(&mut buf);
21246        let mut unstructured = Unstructured::new(&buf);
21247        Self::arbitrary(&mut unstructured).unwrap_or_default()
21248    }
21249}
21250impl Default for MISSION_SET_CURRENT_DATA {
21251    fn default() -> Self {
21252        Self::DEFAULT.clone()
21253    }
21254}
21255impl MessageData for MISSION_SET_CURRENT_DATA {
21256    type Message = MavMessage;
21257    const ID: u32 = 41u32;
21258    const NAME: &'static str = "MISSION_SET_CURRENT";
21259    const EXTRA_CRC: u8 = 28u8;
21260    const ENCODED_LEN: usize = 4usize;
21261    fn deser(
21262        _version: MavlinkVersion,
21263        __input: &[u8],
21264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21265        let avail_len = __input.len();
21266        let mut payload_buf = [0; Self::ENCODED_LEN];
21267        let mut buf = if avail_len < Self::ENCODED_LEN {
21268            payload_buf[0..avail_len].copy_from_slice(__input);
21269            Bytes::new(&payload_buf)
21270        } else {
21271            Bytes::new(__input)
21272        };
21273        let mut __struct = Self::default();
21274        __struct.seq = buf.get_u16_le();
21275        __struct.target_system = buf.get_u8();
21276        __struct.target_component = buf.get_u8();
21277        Ok(__struct)
21278    }
21279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21280        let mut __tmp = BytesMut::new(bytes);
21281        #[allow(clippy::absurd_extreme_comparisons)]
21282        #[allow(unused_comparisons)]
21283        if __tmp.remaining() < Self::ENCODED_LEN {
21284            panic!(
21285                "buffer is too small (need {} bytes, but got {})",
21286                Self::ENCODED_LEN,
21287                __tmp.remaining(),
21288            )
21289        }
21290        __tmp.put_u16_le(self.seq);
21291        __tmp.put_u8(self.target_system);
21292        __tmp.put_u8(self.target_component);
21293        if matches!(version, MavlinkVersion::V2) {
21294            let len = __tmp.len();
21295            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21296        } else {
21297            __tmp.len()
21298        }
21299    }
21300}
21301#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21302#[doc = ""]
21303#[doc = "ID: 38"]
21304#[derive(Debug, Clone, PartialEq)]
21305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21306#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21307#[cfg_attr(feature = "ts", derive(TS))]
21308#[cfg_attr(feature = "ts", ts(export))]
21309pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21310    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21311    pub start_index: i16,
21312    #[doc = "End index, equal or greater than start index."]
21313    pub end_index: i16,
21314    #[doc = "System ID"]
21315    pub target_system: u8,
21316    #[doc = "Component ID"]
21317    pub target_component: u8,
21318    #[doc = "Mission type."]
21319    #[cfg_attr(feature = "serde", serde(default))]
21320    pub mission_type: MavMissionType,
21321}
21322impl MISSION_WRITE_PARTIAL_LIST_DATA {
21323    pub const ENCODED_LEN: usize = 7usize;
21324    pub const DEFAULT: Self = Self {
21325        start_index: 0_i16,
21326        end_index: 0_i16,
21327        target_system: 0_u8,
21328        target_component: 0_u8,
21329        mission_type: MavMissionType::DEFAULT,
21330    };
21331    #[cfg(feature = "arbitrary")]
21332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21333        use arbitrary::{Arbitrary, Unstructured};
21334        let mut buf = [0u8; 1024];
21335        rng.fill_bytes(&mut buf);
21336        let mut unstructured = Unstructured::new(&buf);
21337        Self::arbitrary(&mut unstructured).unwrap_or_default()
21338    }
21339}
21340impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21341    fn default() -> Self {
21342        Self::DEFAULT.clone()
21343    }
21344}
21345impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21346    type Message = MavMessage;
21347    const ID: u32 = 38u32;
21348    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21349    const EXTRA_CRC: u8 = 9u8;
21350    const ENCODED_LEN: usize = 7usize;
21351    fn deser(
21352        _version: MavlinkVersion,
21353        __input: &[u8],
21354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21355        let avail_len = __input.len();
21356        let mut payload_buf = [0; Self::ENCODED_LEN];
21357        let mut buf = if avail_len < Self::ENCODED_LEN {
21358            payload_buf[0..avail_len].copy_from_slice(__input);
21359            Bytes::new(&payload_buf)
21360        } else {
21361            Bytes::new(__input)
21362        };
21363        let mut __struct = Self::default();
21364        __struct.start_index = buf.get_i16_le();
21365        __struct.end_index = buf.get_i16_le();
21366        __struct.target_system = buf.get_u8();
21367        __struct.target_component = buf.get_u8();
21368        let tmp = buf.get_u8();
21369        __struct.mission_type =
21370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21371                enum_type: "MavMissionType",
21372                value: tmp as u64,
21373            })?;
21374        Ok(__struct)
21375    }
21376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21377        let mut __tmp = BytesMut::new(bytes);
21378        #[allow(clippy::absurd_extreme_comparisons)]
21379        #[allow(unused_comparisons)]
21380        if __tmp.remaining() < Self::ENCODED_LEN {
21381            panic!(
21382                "buffer is too small (need {} bytes, but got {})",
21383                Self::ENCODED_LEN,
21384                __tmp.remaining(),
21385            )
21386        }
21387        __tmp.put_i16_le(self.start_index);
21388        __tmp.put_i16_le(self.end_index);
21389        __tmp.put_u8(self.target_system);
21390        __tmp.put_u8(self.target_component);
21391        if matches!(version, MavlinkVersion::V2) {
21392            __tmp.put_u8(self.mission_type as u8);
21393            let len = __tmp.len();
21394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21395        } else {
21396            __tmp.len()
21397        }
21398    }
21399}
21400#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21401#[doc = "Orientation of a mount."]
21402#[doc = ""]
21403#[doc = "ID: 265"]
21404#[derive(Debug, Clone, PartialEq)]
21405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21407#[cfg_attr(feature = "ts", derive(TS))]
21408#[cfg_attr(feature = "ts", ts(export))]
21409pub struct MOUNT_ORIENTATION_DATA {
21410    #[doc = "Timestamp (time since system boot)."]
21411    pub time_boot_ms: u32,
21412    #[doc = "Roll in global frame (set to NaN for invalid)."]
21413    pub roll: f32,
21414    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21415    pub pitch: f32,
21416    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21417    pub yaw: f32,
21418    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21420    pub yaw_absolute: f32,
21421}
21422impl MOUNT_ORIENTATION_DATA {
21423    pub const ENCODED_LEN: usize = 20usize;
21424    pub const DEFAULT: Self = Self {
21425        time_boot_ms: 0_u32,
21426        roll: 0.0_f32,
21427        pitch: 0.0_f32,
21428        yaw: 0.0_f32,
21429        yaw_absolute: 0.0_f32,
21430    };
21431    #[cfg(feature = "arbitrary")]
21432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21433        use arbitrary::{Arbitrary, Unstructured};
21434        let mut buf = [0u8; 1024];
21435        rng.fill_bytes(&mut buf);
21436        let mut unstructured = Unstructured::new(&buf);
21437        Self::arbitrary(&mut unstructured).unwrap_or_default()
21438    }
21439}
21440impl Default for MOUNT_ORIENTATION_DATA {
21441    fn default() -> Self {
21442        Self::DEFAULT.clone()
21443    }
21444}
21445impl MessageData for MOUNT_ORIENTATION_DATA {
21446    type Message = MavMessage;
21447    const ID: u32 = 265u32;
21448    const NAME: &'static str = "MOUNT_ORIENTATION";
21449    const EXTRA_CRC: u8 = 26u8;
21450    const ENCODED_LEN: usize = 20usize;
21451    fn deser(
21452        _version: MavlinkVersion,
21453        __input: &[u8],
21454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21455        let avail_len = __input.len();
21456        let mut payload_buf = [0; Self::ENCODED_LEN];
21457        let mut buf = if avail_len < Self::ENCODED_LEN {
21458            payload_buf[0..avail_len].copy_from_slice(__input);
21459            Bytes::new(&payload_buf)
21460        } else {
21461            Bytes::new(__input)
21462        };
21463        let mut __struct = Self::default();
21464        __struct.time_boot_ms = buf.get_u32_le();
21465        __struct.roll = buf.get_f32_le();
21466        __struct.pitch = buf.get_f32_le();
21467        __struct.yaw = buf.get_f32_le();
21468        __struct.yaw_absolute = buf.get_f32_le();
21469        Ok(__struct)
21470    }
21471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21472        let mut __tmp = BytesMut::new(bytes);
21473        #[allow(clippy::absurd_extreme_comparisons)]
21474        #[allow(unused_comparisons)]
21475        if __tmp.remaining() < Self::ENCODED_LEN {
21476            panic!(
21477                "buffer is too small (need {} bytes, but got {})",
21478                Self::ENCODED_LEN,
21479                __tmp.remaining(),
21480            )
21481        }
21482        __tmp.put_u32_le(self.time_boot_ms);
21483        __tmp.put_f32_le(self.roll);
21484        __tmp.put_f32_le(self.pitch);
21485        __tmp.put_f32_le(self.yaw);
21486        if matches!(version, MavlinkVersion::V2) {
21487            __tmp.put_f32_le(self.yaw_absolute);
21488            let len = __tmp.len();
21489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21490        } else {
21491            __tmp.len()
21492        }
21493    }
21494}
21495#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21496#[doc = ""]
21497#[doc = "ID: 251"]
21498#[derive(Debug, Clone, PartialEq)]
21499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21501#[cfg_attr(feature = "ts", derive(TS))]
21502#[cfg_attr(feature = "ts", ts(export))]
21503pub struct NAMED_VALUE_FLOAT_DATA {
21504    #[doc = "Timestamp (time since system boot)."]
21505    pub time_boot_ms: u32,
21506    #[doc = "Floating point value"]
21507    pub value: f32,
21508    #[doc = "Name of the debug variable"]
21509    #[cfg_attr(feature = "ts", ts(type = "string"))]
21510    pub name: CharArray<10>,
21511}
21512impl NAMED_VALUE_FLOAT_DATA {
21513    pub const ENCODED_LEN: usize = 18usize;
21514    pub const DEFAULT: Self = Self {
21515        time_boot_ms: 0_u32,
21516        value: 0.0_f32,
21517        name: CharArray::new([0_u8; 10usize]),
21518    };
21519    #[cfg(feature = "arbitrary")]
21520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21521        use arbitrary::{Arbitrary, Unstructured};
21522        let mut buf = [0u8; 1024];
21523        rng.fill_bytes(&mut buf);
21524        let mut unstructured = Unstructured::new(&buf);
21525        Self::arbitrary(&mut unstructured).unwrap_or_default()
21526    }
21527}
21528impl Default for NAMED_VALUE_FLOAT_DATA {
21529    fn default() -> Self {
21530        Self::DEFAULT.clone()
21531    }
21532}
21533impl MessageData for NAMED_VALUE_FLOAT_DATA {
21534    type Message = MavMessage;
21535    const ID: u32 = 251u32;
21536    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21537    const EXTRA_CRC: u8 = 170u8;
21538    const ENCODED_LEN: usize = 18usize;
21539    fn deser(
21540        _version: MavlinkVersion,
21541        __input: &[u8],
21542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21543        let avail_len = __input.len();
21544        let mut payload_buf = [0; Self::ENCODED_LEN];
21545        let mut buf = if avail_len < Self::ENCODED_LEN {
21546            payload_buf[0..avail_len].copy_from_slice(__input);
21547            Bytes::new(&payload_buf)
21548        } else {
21549            Bytes::new(__input)
21550        };
21551        let mut __struct = Self::default();
21552        __struct.time_boot_ms = buf.get_u32_le();
21553        __struct.value = buf.get_f32_le();
21554        let mut tmp = [0_u8; 10usize];
21555        for v in &mut tmp {
21556            *v = buf.get_u8();
21557        }
21558        __struct.name = CharArray::new(tmp);
21559        Ok(__struct)
21560    }
21561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21562        let mut __tmp = BytesMut::new(bytes);
21563        #[allow(clippy::absurd_extreme_comparisons)]
21564        #[allow(unused_comparisons)]
21565        if __tmp.remaining() < Self::ENCODED_LEN {
21566            panic!(
21567                "buffer is too small (need {} bytes, but got {})",
21568                Self::ENCODED_LEN,
21569                __tmp.remaining(),
21570            )
21571        }
21572        __tmp.put_u32_le(self.time_boot_ms);
21573        __tmp.put_f32_le(self.value);
21574        for val in &self.name {
21575            __tmp.put_u8(*val);
21576        }
21577        if matches!(version, MavlinkVersion::V2) {
21578            let len = __tmp.len();
21579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21580        } else {
21581            __tmp.len()
21582        }
21583    }
21584}
21585#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21586#[doc = ""]
21587#[doc = "ID: 252"]
21588#[derive(Debug, Clone, PartialEq)]
21589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21591#[cfg_attr(feature = "ts", derive(TS))]
21592#[cfg_attr(feature = "ts", ts(export))]
21593pub struct NAMED_VALUE_INT_DATA {
21594    #[doc = "Timestamp (time since system boot)."]
21595    pub time_boot_ms: u32,
21596    #[doc = "Signed integer value"]
21597    pub value: i32,
21598    #[doc = "Name of the debug variable"]
21599    #[cfg_attr(feature = "ts", ts(type = "string"))]
21600    pub name: CharArray<10>,
21601}
21602impl NAMED_VALUE_INT_DATA {
21603    pub const ENCODED_LEN: usize = 18usize;
21604    pub const DEFAULT: Self = Self {
21605        time_boot_ms: 0_u32,
21606        value: 0_i32,
21607        name: CharArray::new([0_u8; 10usize]),
21608    };
21609    #[cfg(feature = "arbitrary")]
21610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21611        use arbitrary::{Arbitrary, Unstructured};
21612        let mut buf = [0u8; 1024];
21613        rng.fill_bytes(&mut buf);
21614        let mut unstructured = Unstructured::new(&buf);
21615        Self::arbitrary(&mut unstructured).unwrap_or_default()
21616    }
21617}
21618impl Default for NAMED_VALUE_INT_DATA {
21619    fn default() -> Self {
21620        Self::DEFAULT.clone()
21621    }
21622}
21623impl MessageData for NAMED_VALUE_INT_DATA {
21624    type Message = MavMessage;
21625    const ID: u32 = 252u32;
21626    const NAME: &'static str = "NAMED_VALUE_INT";
21627    const EXTRA_CRC: u8 = 44u8;
21628    const ENCODED_LEN: usize = 18usize;
21629    fn deser(
21630        _version: MavlinkVersion,
21631        __input: &[u8],
21632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21633        let avail_len = __input.len();
21634        let mut payload_buf = [0; Self::ENCODED_LEN];
21635        let mut buf = if avail_len < Self::ENCODED_LEN {
21636            payload_buf[0..avail_len].copy_from_slice(__input);
21637            Bytes::new(&payload_buf)
21638        } else {
21639            Bytes::new(__input)
21640        };
21641        let mut __struct = Self::default();
21642        __struct.time_boot_ms = buf.get_u32_le();
21643        __struct.value = buf.get_i32_le();
21644        let mut tmp = [0_u8; 10usize];
21645        for v in &mut tmp {
21646            *v = buf.get_u8();
21647        }
21648        __struct.name = CharArray::new(tmp);
21649        Ok(__struct)
21650    }
21651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21652        let mut __tmp = BytesMut::new(bytes);
21653        #[allow(clippy::absurd_extreme_comparisons)]
21654        #[allow(unused_comparisons)]
21655        if __tmp.remaining() < Self::ENCODED_LEN {
21656            panic!(
21657                "buffer is too small (need {} bytes, but got {})",
21658                Self::ENCODED_LEN,
21659                __tmp.remaining(),
21660            )
21661        }
21662        __tmp.put_u32_le(self.time_boot_ms);
21663        __tmp.put_i32_le(self.value);
21664        for val in &self.name {
21665            __tmp.put_u8(*val);
21666        }
21667        if matches!(version, MavlinkVersion::V2) {
21668            let len = __tmp.len();
21669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21670        } else {
21671            __tmp.len()
21672        }
21673    }
21674}
21675#[doc = "The state of the navigation and position controller."]
21676#[doc = ""]
21677#[doc = "ID: 62"]
21678#[derive(Debug, Clone, PartialEq)]
21679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21681#[cfg_attr(feature = "ts", derive(TS))]
21682#[cfg_attr(feature = "ts", ts(export))]
21683pub struct NAV_CONTROLLER_OUTPUT_DATA {
21684    #[doc = "Current desired roll"]
21685    pub nav_roll: f32,
21686    #[doc = "Current desired pitch"]
21687    pub nav_pitch: f32,
21688    #[doc = "Current altitude error"]
21689    pub alt_error: f32,
21690    #[doc = "Current airspeed error"]
21691    pub aspd_error: f32,
21692    #[doc = "Current crosstrack error on x-y plane"]
21693    pub xtrack_error: f32,
21694    #[doc = "Current desired heading"]
21695    pub nav_bearing: i16,
21696    #[doc = "Bearing to current waypoint/target"]
21697    pub target_bearing: i16,
21698    #[doc = "Distance to active waypoint"]
21699    pub wp_dist: u16,
21700}
21701impl NAV_CONTROLLER_OUTPUT_DATA {
21702    pub const ENCODED_LEN: usize = 26usize;
21703    pub const DEFAULT: Self = Self {
21704        nav_roll: 0.0_f32,
21705        nav_pitch: 0.0_f32,
21706        alt_error: 0.0_f32,
21707        aspd_error: 0.0_f32,
21708        xtrack_error: 0.0_f32,
21709        nav_bearing: 0_i16,
21710        target_bearing: 0_i16,
21711        wp_dist: 0_u16,
21712    };
21713    #[cfg(feature = "arbitrary")]
21714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21715        use arbitrary::{Arbitrary, Unstructured};
21716        let mut buf = [0u8; 1024];
21717        rng.fill_bytes(&mut buf);
21718        let mut unstructured = Unstructured::new(&buf);
21719        Self::arbitrary(&mut unstructured).unwrap_or_default()
21720    }
21721}
21722impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21723    fn default() -> Self {
21724        Self::DEFAULT.clone()
21725    }
21726}
21727impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21728    type Message = MavMessage;
21729    const ID: u32 = 62u32;
21730    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21731    const EXTRA_CRC: u8 = 183u8;
21732    const ENCODED_LEN: usize = 26usize;
21733    fn deser(
21734        _version: MavlinkVersion,
21735        __input: &[u8],
21736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21737        let avail_len = __input.len();
21738        let mut payload_buf = [0; Self::ENCODED_LEN];
21739        let mut buf = if avail_len < Self::ENCODED_LEN {
21740            payload_buf[0..avail_len].copy_from_slice(__input);
21741            Bytes::new(&payload_buf)
21742        } else {
21743            Bytes::new(__input)
21744        };
21745        let mut __struct = Self::default();
21746        __struct.nav_roll = buf.get_f32_le();
21747        __struct.nav_pitch = buf.get_f32_le();
21748        __struct.alt_error = buf.get_f32_le();
21749        __struct.aspd_error = buf.get_f32_le();
21750        __struct.xtrack_error = buf.get_f32_le();
21751        __struct.nav_bearing = buf.get_i16_le();
21752        __struct.target_bearing = buf.get_i16_le();
21753        __struct.wp_dist = buf.get_u16_le();
21754        Ok(__struct)
21755    }
21756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21757        let mut __tmp = BytesMut::new(bytes);
21758        #[allow(clippy::absurd_extreme_comparisons)]
21759        #[allow(unused_comparisons)]
21760        if __tmp.remaining() < Self::ENCODED_LEN {
21761            panic!(
21762                "buffer is too small (need {} bytes, but got {})",
21763                Self::ENCODED_LEN,
21764                __tmp.remaining(),
21765            )
21766        }
21767        __tmp.put_f32_le(self.nav_roll);
21768        __tmp.put_f32_le(self.nav_pitch);
21769        __tmp.put_f32_le(self.alt_error);
21770        __tmp.put_f32_le(self.aspd_error);
21771        __tmp.put_f32_le(self.xtrack_error);
21772        __tmp.put_i16_le(self.nav_bearing);
21773        __tmp.put_i16_le(self.target_bearing);
21774        __tmp.put_u16_le(self.wp_dist);
21775        if matches!(version, MavlinkVersion::V2) {
21776            let len = __tmp.len();
21777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21778        } else {
21779            __tmp.len()
21780        }
21781    }
21782}
21783#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21784#[doc = ""]
21785#[doc = "ID: 330"]
21786#[derive(Debug, Clone, PartialEq)]
21787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21789#[cfg_attr(feature = "ts", derive(TS))]
21790#[cfg_attr(feature = "ts", ts(export))]
21791pub struct OBSTACLE_DISTANCE_DATA {
21792    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21793    pub time_usec: u64,
21794    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21795    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21796    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21797    pub distances: [u16; 72],
21798    #[doc = "Minimum distance the sensor can measure."]
21799    pub min_distance: u16,
21800    #[doc = "Maximum distance the sensor can measure."]
21801    pub max_distance: u16,
21802    #[doc = "Class id of the distance sensor type."]
21803    pub sensor_type: MavDistanceSensor,
21804    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21805    pub increment: u8,
21806    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21808    pub increment_f: f32,
21809    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21811    pub angle_offset: f32,
21812    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21813    #[cfg_attr(feature = "serde", serde(default))]
21814    pub frame: MavFrame,
21815}
21816impl OBSTACLE_DISTANCE_DATA {
21817    pub const ENCODED_LEN: usize = 167usize;
21818    pub const DEFAULT: Self = Self {
21819        time_usec: 0_u64,
21820        distances: [0_u16; 72usize],
21821        min_distance: 0_u16,
21822        max_distance: 0_u16,
21823        sensor_type: MavDistanceSensor::DEFAULT,
21824        increment: 0_u8,
21825        increment_f: 0.0_f32,
21826        angle_offset: 0.0_f32,
21827        frame: MavFrame::DEFAULT,
21828    };
21829    #[cfg(feature = "arbitrary")]
21830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21831        use arbitrary::{Arbitrary, Unstructured};
21832        let mut buf = [0u8; 1024];
21833        rng.fill_bytes(&mut buf);
21834        let mut unstructured = Unstructured::new(&buf);
21835        Self::arbitrary(&mut unstructured).unwrap_or_default()
21836    }
21837}
21838impl Default for OBSTACLE_DISTANCE_DATA {
21839    fn default() -> Self {
21840        Self::DEFAULT.clone()
21841    }
21842}
21843impl MessageData for OBSTACLE_DISTANCE_DATA {
21844    type Message = MavMessage;
21845    const ID: u32 = 330u32;
21846    const NAME: &'static str = "OBSTACLE_DISTANCE";
21847    const EXTRA_CRC: u8 = 23u8;
21848    const ENCODED_LEN: usize = 167usize;
21849    fn deser(
21850        _version: MavlinkVersion,
21851        __input: &[u8],
21852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21853        let avail_len = __input.len();
21854        let mut payload_buf = [0; Self::ENCODED_LEN];
21855        let mut buf = if avail_len < Self::ENCODED_LEN {
21856            payload_buf[0..avail_len].copy_from_slice(__input);
21857            Bytes::new(&payload_buf)
21858        } else {
21859            Bytes::new(__input)
21860        };
21861        let mut __struct = Self::default();
21862        __struct.time_usec = buf.get_u64_le();
21863        for v in &mut __struct.distances {
21864            let val = buf.get_u16_le();
21865            *v = val;
21866        }
21867        __struct.min_distance = buf.get_u16_le();
21868        __struct.max_distance = buf.get_u16_le();
21869        let tmp = buf.get_u8();
21870        __struct.sensor_type =
21871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21872                enum_type: "MavDistanceSensor",
21873                value: tmp as u64,
21874            })?;
21875        __struct.increment = buf.get_u8();
21876        __struct.increment_f = buf.get_f32_le();
21877        __struct.angle_offset = buf.get_f32_le();
21878        let tmp = buf.get_u8();
21879        __struct.frame =
21880            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21881                enum_type: "MavFrame",
21882                value: tmp as u64,
21883            })?;
21884        Ok(__struct)
21885    }
21886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21887        let mut __tmp = BytesMut::new(bytes);
21888        #[allow(clippy::absurd_extreme_comparisons)]
21889        #[allow(unused_comparisons)]
21890        if __tmp.remaining() < Self::ENCODED_LEN {
21891            panic!(
21892                "buffer is too small (need {} bytes, but got {})",
21893                Self::ENCODED_LEN,
21894                __tmp.remaining(),
21895            )
21896        }
21897        __tmp.put_u64_le(self.time_usec);
21898        for val in &self.distances {
21899            __tmp.put_u16_le(*val);
21900        }
21901        __tmp.put_u16_le(self.min_distance);
21902        __tmp.put_u16_le(self.max_distance);
21903        __tmp.put_u8(self.sensor_type as u8);
21904        __tmp.put_u8(self.increment);
21905        if matches!(version, MavlinkVersion::V2) {
21906            __tmp.put_f32_le(self.increment_f);
21907            __tmp.put_f32_le(self.angle_offset);
21908            __tmp.put_u8(self.frame as u8);
21909            let len = __tmp.len();
21910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21911        } else {
21912            __tmp.len()
21913        }
21914    }
21915}
21916#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21917#[doc = ""]
21918#[doc = "ID: 331"]
21919#[derive(Debug, Clone, PartialEq)]
21920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21922#[cfg_attr(feature = "ts", derive(TS))]
21923#[cfg_attr(feature = "ts", ts(export))]
21924pub struct ODOMETRY_DATA {
21925    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21926    pub time_usec: u64,
21927    #[doc = "X Position"]
21928    pub x: f32,
21929    #[doc = "Y Position"]
21930    pub y: f32,
21931    #[doc = "Z Position"]
21932    pub z: f32,
21933    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21934    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21935    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21936    pub q: [f32; 4],
21937    #[doc = "X linear speed"]
21938    pub vx: f32,
21939    #[doc = "Y linear speed"]
21940    pub vy: f32,
21941    #[doc = "Z linear speed"]
21942    pub vz: f32,
21943    #[doc = "Roll angular speed"]
21944    pub rollspeed: f32,
21945    #[doc = "Pitch angular speed"]
21946    pub pitchspeed: f32,
21947    #[doc = "Yaw angular speed"]
21948    pub yawspeed: f32,
21949    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21951    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21952    pub pose_covariance: [f32; 21],
21953    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21955    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21956    pub velocity_covariance: [f32; 21],
21957    #[doc = "Coordinate frame of reference for the pose data."]
21958    pub frame_id: MavFrame,
21959    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21960    pub child_frame_id: MavFrame,
21961    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21963    pub reset_counter: u8,
21964    #[doc = "Type of estimator that is providing the odometry."]
21965    #[cfg_attr(feature = "serde", serde(default))]
21966    pub estimator_type: MavEstimatorType,
21967    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21969    pub quality: i8,
21970}
21971impl ODOMETRY_DATA {
21972    pub const ENCODED_LEN: usize = 233usize;
21973    pub const DEFAULT: Self = Self {
21974        time_usec: 0_u64,
21975        x: 0.0_f32,
21976        y: 0.0_f32,
21977        z: 0.0_f32,
21978        q: [0.0_f32; 4usize],
21979        vx: 0.0_f32,
21980        vy: 0.0_f32,
21981        vz: 0.0_f32,
21982        rollspeed: 0.0_f32,
21983        pitchspeed: 0.0_f32,
21984        yawspeed: 0.0_f32,
21985        pose_covariance: [0.0_f32; 21usize],
21986        velocity_covariance: [0.0_f32; 21usize],
21987        frame_id: MavFrame::DEFAULT,
21988        child_frame_id: MavFrame::DEFAULT,
21989        reset_counter: 0_u8,
21990        estimator_type: MavEstimatorType::DEFAULT,
21991        quality: 0_i8,
21992    };
21993    #[cfg(feature = "arbitrary")]
21994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21995        use arbitrary::{Arbitrary, Unstructured};
21996        let mut buf = [0u8; 1024];
21997        rng.fill_bytes(&mut buf);
21998        let mut unstructured = Unstructured::new(&buf);
21999        Self::arbitrary(&mut unstructured).unwrap_or_default()
22000    }
22001}
22002impl Default for ODOMETRY_DATA {
22003    fn default() -> Self {
22004        Self::DEFAULT.clone()
22005    }
22006}
22007impl MessageData for ODOMETRY_DATA {
22008    type Message = MavMessage;
22009    const ID: u32 = 331u32;
22010    const NAME: &'static str = "ODOMETRY";
22011    const EXTRA_CRC: u8 = 91u8;
22012    const ENCODED_LEN: usize = 233usize;
22013    fn deser(
22014        _version: MavlinkVersion,
22015        __input: &[u8],
22016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22017        let avail_len = __input.len();
22018        let mut payload_buf = [0; Self::ENCODED_LEN];
22019        let mut buf = if avail_len < Self::ENCODED_LEN {
22020            payload_buf[0..avail_len].copy_from_slice(__input);
22021            Bytes::new(&payload_buf)
22022        } else {
22023            Bytes::new(__input)
22024        };
22025        let mut __struct = Self::default();
22026        __struct.time_usec = buf.get_u64_le();
22027        __struct.x = buf.get_f32_le();
22028        __struct.y = buf.get_f32_le();
22029        __struct.z = buf.get_f32_le();
22030        for v in &mut __struct.q {
22031            let val = buf.get_f32_le();
22032            *v = val;
22033        }
22034        __struct.vx = buf.get_f32_le();
22035        __struct.vy = buf.get_f32_le();
22036        __struct.vz = buf.get_f32_le();
22037        __struct.rollspeed = buf.get_f32_le();
22038        __struct.pitchspeed = buf.get_f32_le();
22039        __struct.yawspeed = buf.get_f32_le();
22040        for v in &mut __struct.pose_covariance {
22041            let val = buf.get_f32_le();
22042            *v = val;
22043        }
22044        for v in &mut __struct.velocity_covariance {
22045            let val = buf.get_f32_le();
22046            *v = val;
22047        }
22048        let tmp = buf.get_u8();
22049        __struct.frame_id =
22050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22051                enum_type: "MavFrame",
22052                value: tmp as u64,
22053            })?;
22054        let tmp = buf.get_u8();
22055        __struct.child_frame_id =
22056            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22057                enum_type: "MavFrame",
22058                value: tmp as u64,
22059            })?;
22060        __struct.reset_counter = buf.get_u8();
22061        let tmp = buf.get_u8();
22062        __struct.estimator_type =
22063            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22064                enum_type: "MavEstimatorType",
22065                value: tmp as u64,
22066            })?;
22067        __struct.quality = buf.get_i8();
22068        Ok(__struct)
22069    }
22070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22071        let mut __tmp = BytesMut::new(bytes);
22072        #[allow(clippy::absurd_extreme_comparisons)]
22073        #[allow(unused_comparisons)]
22074        if __tmp.remaining() < Self::ENCODED_LEN {
22075            panic!(
22076                "buffer is too small (need {} bytes, but got {})",
22077                Self::ENCODED_LEN,
22078                __tmp.remaining(),
22079            )
22080        }
22081        __tmp.put_u64_le(self.time_usec);
22082        __tmp.put_f32_le(self.x);
22083        __tmp.put_f32_le(self.y);
22084        __tmp.put_f32_le(self.z);
22085        for val in &self.q {
22086            __tmp.put_f32_le(*val);
22087        }
22088        __tmp.put_f32_le(self.vx);
22089        __tmp.put_f32_le(self.vy);
22090        __tmp.put_f32_le(self.vz);
22091        __tmp.put_f32_le(self.rollspeed);
22092        __tmp.put_f32_le(self.pitchspeed);
22093        __tmp.put_f32_le(self.yawspeed);
22094        for val in &self.pose_covariance {
22095            __tmp.put_f32_le(*val);
22096        }
22097        for val in &self.velocity_covariance {
22098            __tmp.put_f32_le(*val);
22099        }
22100        __tmp.put_u8(self.frame_id as u8);
22101        __tmp.put_u8(self.child_frame_id as u8);
22102        if matches!(version, MavlinkVersion::V2) {
22103            __tmp.put_u8(self.reset_counter);
22104            __tmp.put_u8(self.estimator_type as u8);
22105            __tmp.put_i8(self.quality);
22106            let len = __tmp.len();
22107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22108        } else {
22109            __tmp.len()
22110        }
22111    }
22112}
22113#[doc = "Hardware status sent by an onboard computer."]
22114#[doc = ""]
22115#[doc = "ID: 390"]
22116#[derive(Debug, Clone, PartialEq)]
22117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22119#[cfg_attr(feature = "ts", derive(TS))]
22120#[cfg_attr(feature = "ts", ts(export))]
22121pub struct ONBOARD_COMPUTER_STATUS_DATA {
22122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22123    pub time_usec: u64,
22124    #[doc = "Time since system boot."]
22125    pub uptime: u32,
22126    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22127    pub ram_usage: u32,
22128    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22129    pub ram_total: u32,
22130    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22132    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22133    pub storage_type: [u32; 4],
22134    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22137    pub storage_usage: [u32; 4],
22138    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22140    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22141    pub storage_total: [u32; 4],
22142    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22143    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22144    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22145    pub link_type: [u32; 6],
22146    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22147    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22148    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22149    pub link_tx_rate: [u32; 6],
22150    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22153    pub link_rx_rate: [u32; 6],
22154    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22155    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22156    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22157    pub link_tx_max: [u32; 6],
22158    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22159    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22160    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22161    pub link_rx_max: [u32; 6],
22162    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22163    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22164    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22165    pub fan_speed: [i16; 4],
22166    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22167    pub mavtype: u8,
22168    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22170    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22171    pub cpu_cores: [u8; 8],
22172    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22175    pub cpu_combined: [u8; 10],
22176    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22179    pub gpu_cores: [u8; 4],
22180    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22183    pub gpu_combined: [u8; 10],
22184    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22185    pub temperature_board: i8,
22186    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22189    pub temperature_core: [i8; 8],
22190}
22191impl ONBOARD_COMPUTER_STATUS_DATA {
22192    pub const ENCODED_LEN: usize = 238usize;
22193    pub const DEFAULT: Self = Self {
22194        time_usec: 0_u64,
22195        uptime: 0_u32,
22196        ram_usage: 0_u32,
22197        ram_total: 0_u32,
22198        storage_type: [0_u32; 4usize],
22199        storage_usage: [0_u32; 4usize],
22200        storage_total: [0_u32; 4usize],
22201        link_type: [0_u32; 6usize],
22202        link_tx_rate: [0_u32; 6usize],
22203        link_rx_rate: [0_u32; 6usize],
22204        link_tx_max: [0_u32; 6usize],
22205        link_rx_max: [0_u32; 6usize],
22206        fan_speed: [0_i16; 4usize],
22207        mavtype: 0_u8,
22208        cpu_cores: [0_u8; 8usize],
22209        cpu_combined: [0_u8; 10usize],
22210        gpu_cores: [0_u8; 4usize],
22211        gpu_combined: [0_u8; 10usize],
22212        temperature_board: 0_i8,
22213        temperature_core: [0_i8; 8usize],
22214    };
22215    #[cfg(feature = "arbitrary")]
22216    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22217        use arbitrary::{Arbitrary, Unstructured};
22218        let mut buf = [0u8; 1024];
22219        rng.fill_bytes(&mut buf);
22220        let mut unstructured = Unstructured::new(&buf);
22221        Self::arbitrary(&mut unstructured).unwrap_or_default()
22222    }
22223}
22224impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22225    fn default() -> Self {
22226        Self::DEFAULT.clone()
22227    }
22228}
22229impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22230    type Message = MavMessage;
22231    const ID: u32 = 390u32;
22232    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22233    const EXTRA_CRC: u8 = 156u8;
22234    const ENCODED_LEN: usize = 238usize;
22235    fn deser(
22236        _version: MavlinkVersion,
22237        __input: &[u8],
22238    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22239        let avail_len = __input.len();
22240        let mut payload_buf = [0; Self::ENCODED_LEN];
22241        let mut buf = if avail_len < Self::ENCODED_LEN {
22242            payload_buf[0..avail_len].copy_from_slice(__input);
22243            Bytes::new(&payload_buf)
22244        } else {
22245            Bytes::new(__input)
22246        };
22247        let mut __struct = Self::default();
22248        __struct.time_usec = buf.get_u64_le();
22249        __struct.uptime = buf.get_u32_le();
22250        __struct.ram_usage = buf.get_u32_le();
22251        __struct.ram_total = buf.get_u32_le();
22252        for v in &mut __struct.storage_type {
22253            let val = buf.get_u32_le();
22254            *v = val;
22255        }
22256        for v in &mut __struct.storage_usage {
22257            let val = buf.get_u32_le();
22258            *v = val;
22259        }
22260        for v in &mut __struct.storage_total {
22261            let val = buf.get_u32_le();
22262            *v = val;
22263        }
22264        for v in &mut __struct.link_type {
22265            let val = buf.get_u32_le();
22266            *v = val;
22267        }
22268        for v in &mut __struct.link_tx_rate {
22269            let val = buf.get_u32_le();
22270            *v = val;
22271        }
22272        for v in &mut __struct.link_rx_rate {
22273            let val = buf.get_u32_le();
22274            *v = val;
22275        }
22276        for v in &mut __struct.link_tx_max {
22277            let val = buf.get_u32_le();
22278            *v = val;
22279        }
22280        for v in &mut __struct.link_rx_max {
22281            let val = buf.get_u32_le();
22282            *v = val;
22283        }
22284        for v in &mut __struct.fan_speed {
22285            let val = buf.get_i16_le();
22286            *v = val;
22287        }
22288        __struct.mavtype = buf.get_u8();
22289        for v in &mut __struct.cpu_cores {
22290            let val = buf.get_u8();
22291            *v = val;
22292        }
22293        for v in &mut __struct.cpu_combined {
22294            let val = buf.get_u8();
22295            *v = val;
22296        }
22297        for v in &mut __struct.gpu_cores {
22298            let val = buf.get_u8();
22299            *v = val;
22300        }
22301        for v in &mut __struct.gpu_combined {
22302            let val = buf.get_u8();
22303            *v = val;
22304        }
22305        __struct.temperature_board = buf.get_i8();
22306        for v in &mut __struct.temperature_core {
22307            let val = buf.get_i8();
22308            *v = val;
22309        }
22310        Ok(__struct)
22311    }
22312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22313        let mut __tmp = BytesMut::new(bytes);
22314        #[allow(clippy::absurd_extreme_comparisons)]
22315        #[allow(unused_comparisons)]
22316        if __tmp.remaining() < Self::ENCODED_LEN {
22317            panic!(
22318                "buffer is too small (need {} bytes, but got {})",
22319                Self::ENCODED_LEN,
22320                __tmp.remaining(),
22321            )
22322        }
22323        __tmp.put_u64_le(self.time_usec);
22324        __tmp.put_u32_le(self.uptime);
22325        __tmp.put_u32_le(self.ram_usage);
22326        __tmp.put_u32_le(self.ram_total);
22327        for val in &self.storage_type {
22328            __tmp.put_u32_le(*val);
22329        }
22330        for val in &self.storage_usage {
22331            __tmp.put_u32_le(*val);
22332        }
22333        for val in &self.storage_total {
22334            __tmp.put_u32_le(*val);
22335        }
22336        for val in &self.link_type {
22337            __tmp.put_u32_le(*val);
22338        }
22339        for val in &self.link_tx_rate {
22340            __tmp.put_u32_le(*val);
22341        }
22342        for val in &self.link_rx_rate {
22343            __tmp.put_u32_le(*val);
22344        }
22345        for val in &self.link_tx_max {
22346            __tmp.put_u32_le(*val);
22347        }
22348        for val in &self.link_rx_max {
22349            __tmp.put_u32_le(*val);
22350        }
22351        for val in &self.fan_speed {
22352            __tmp.put_i16_le(*val);
22353        }
22354        __tmp.put_u8(self.mavtype);
22355        for val in &self.cpu_cores {
22356            __tmp.put_u8(*val);
22357        }
22358        for val in &self.cpu_combined {
22359            __tmp.put_u8(*val);
22360        }
22361        for val in &self.gpu_cores {
22362            __tmp.put_u8(*val);
22363        }
22364        for val in &self.gpu_combined {
22365            __tmp.put_u8(*val);
22366        }
22367        __tmp.put_i8(self.temperature_board);
22368        for val in &self.temperature_core {
22369            __tmp.put_i8(*val);
22370        }
22371        if matches!(version, MavlinkVersion::V2) {
22372            let len = __tmp.len();
22373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22374        } else {
22375            __tmp.len()
22376        }
22377    }
22378}
22379#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22380#[doc = ""]
22381#[doc = "ID: 12918"]
22382#[derive(Debug, Clone, PartialEq)]
22383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22385#[cfg_attr(feature = "ts", derive(TS))]
22386#[cfg_attr(feature = "ts", ts(export))]
22387pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22388    #[doc = "Status level indicating if arming is allowed."]
22389    pub status: MavOdidArmStatus,
22390    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22391    #[cfg_attr(feature = "ts", ts(type = "string"))]
22392    pub error: CharArray<50>,
22393}
22394impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22395    pub const ENCODED_LEN: usize = 51usize;
22396    pub const DEFAULT: Self = Self {
22397        status: MavOdidArmStatus::DEFAULT,
22398        error: CharArray::new([0_u8; 50usize]),
22399    };
22400    #[cfg(feature = "arbitrary")]
22401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22402        use arbitrary::{Arbitrary, Unstructured};
22403        let mut buf = [0u8; 1024];
22404        rng.fill_bytes(&mut buf);
22405        let mut unstructured = Unstructured::new(&buf);
22406        Self::arbitrary(&mut unstructured).unwrap_or_default()
22407    }
22408}
22409impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22410    fn default() -> Self {
22411        Self::DEFAULT.clone()
22412    }
22413}
22414impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22415    type Message = MavMessage;
22416    const ID: u32 = 12918u32;
22417    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22418    const EXTRA_CRC: u8 = 139u8;
22419    const ENCODED_LEN: usize = 51usize;
22420    fn deser(
22421        _version: MavlinkVersion,
22422        __input: &[u8],
22423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22424        let avail_len = __input.len();
22425        let mut payload_buf = [0; Self::ENCODED_LEN];
22426        let mut buf = if avail_len < Self::ENCODED_LEN {
22427            payload_buf[0..avail_len].copy_from_slice(__input);
22428            Bytes::new(&payload_buf)
22429        } else {
22430            Bytes::new(__input)
22431        };
22432        let mut __struct = Self::default();
22433        let tmp = buf.get_u8();
22434        __struct.status =
22435            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22436                enum_type: "MavOdidArmStatus",
22437                value: tmp as u64,
22438            })?;
22439        let mut tmp = [0_u8; 50usize];
22440        for v in &mut tmp {
22441            *v = buf.get_u8();
22442        }
22443        __struct.error = CharArray::new(tmp);
22444        Ok(__struct)
22445    }
22446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22447        let mut __tmp = BytesMut::new(bytes);
22448        #[allow(clippy::absurd_extreme_comparisons)]
22449        #[allow(unused_comparisons)]
22450        if __tmp.remaining() < Self::ENCODED_LEN {
22451            panic!(
22452                "buffer is too small (need {} bytes, but got {})",
22453                Self::ENCODED_LEN,
22454                __tmp.remaining(),
22455            )
22456        }
22457        __tmp.put_u8(self.status as u8);
22458        for val in &self.error {
22459            __tmp.put_u8(*val);
22460        }
22461        if matches!(version, MavlinkVersion::V2) {
22462            let len = __tmp.len();
22463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22464        } else {
22465            __tmp.len()
22466        }
22467    }
22468}
22469#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22470#[doc = ""]
22471#[doc = "ID: 12902"]
22472#[derive(Debug, Clone, PartialEq)]
22473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22475#[cfg_attr(feature = "ts", derive(TS))]
22476#[cfg_attr(feature = "ts", ts(export))]
22477pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22478    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22479    pub timestamp: u32,
22480    #[doc = "System ID (0 for broadcast)."]
22481    pub target_system: u8,
22482    #[doc = "Component ID (0 for broadcast)."]
22483    pub target_component: u8,
22484    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22486    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22487    pub id_or_mac: [u8; 20],
22488    #[doc = "Indicates the type of authentication."]
22489    pub authentication_type: MavOdidAuthType,
22490    #[doc = "Allowed range is 0 - 15."]
22491    pub data_page: u8,
22492    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22493    pub last_page_index: u8,
22494    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22495    pub length: u8,
22496    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22497    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22498    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22499    pub authentication_data: [u8; 23],
22500}
22501impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22502    pub const ENCODED_LEN: usize = 53usize;
22503    pub const DEFAULT: Self = Self {
22504        timestamp: 0_u32,
22505        target_system: 0_u8,
22506        target_component: 0_u8,
22507        id_or_mac: [0_u8; 20usize],
22508        authentication_type: MavOdidAuthType::DEFAULT,
22509        data_page: 0_u8,
22510        last_page_index: 0_u8,
22511        length: 0_u8,
22512        authentication_data: [0_u8; 23usize],
22513    };
22514    #[cfg(feature = "arbitrary")]
22515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22516        use arbitrary::{Arbitrary, Unstructured};
22517        let mut buf = [0u8; 1024];
22518        rng.fill_bytes(&mut buf);
22519        let mut unstructured = Unstructured::new(&buf);
22520        Self::arbitrary(&mut unstructured).unwrap_or_default()
22521    }
22522}
22523impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22524    fn default() -> Self {
22525        Self::DEFAULT.clone()
22526    }
22527}
22528impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22529    type Message = MavMessage;
22530    const ID: u32 = 12902u32;
22531    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22532    const EXTRA_CRC: u8 = 140u8;
22533    const ENCODED_LEN: usize = 53usize;
22534    fn deser(
22535        _version: MavlinkVersion,
22536        __input: &[u8],
22537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22538        let avail_len = __input.len();
22539        let mut payload_buf = [0; Self::ENCODED_LEN];
22540        let mut buf = if avail_len < Self::ENCODED_LEN {
22541            payload_buf[0..avail_len].copy_from_slice(__input);
22542            Bytes::new(&payload_buf)
22543        } else {
22544            Bytes::new(__input)
22545        };
22546        let mut __struct = Self::default();
22547        __struct.timestamp = buf.get_u32_le();
22548        __struct.target_system = buf.get_u8();
22549        __struct.target_component = buf.get_u8();
22550        for v in &mut __struct.id_or_mac {
22551            let val = buf.get_u8();
22552            *v = val;
22553        }
22554        let tmp = buf.get_u8();
22555        __struct.authentication_type =
22556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22557                enum_type: "MavOdidAuthType",
22558                value: tmp as u64,
22559            })?;
22560        __struct.data_page = buf.get_u8();
22561        __struct.last_page_index = buf.get_u8();
22562        __struct.length = buf.get_u8();
22563        for v in &mut __struct.authentication_data {
22564            let val = buf.get_u8();
22565            *v = val;
22566        }
22567        Ok(__struct)
22568    }
22569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22570        let mut __tmp = BytesMut::new(bytes);
22571        #[allow(clippy::absurd_extreme_comparisons)]
22572        #[allow(unused_comparisons)]
22573        if __tmp.remaining() < Self::ENCODED_LEN {
22574            panic!(
22575                "buffer is too small (need {} bytes, but got {})",
22576                Self::ENCODED_LEN,
22577                __tmp.remaining(),
22578            )
22579        }
22580        __tmp.put_u32_le(self.timestamp);
22581        __tmp.put_u8(self.target_system);
22582        __tmp.put_u8(self.target_component);
22583        for val in &self.id_or_mac {
22584            __tmp.put_u8(*val);
22585        }
22586        __tmp.put_u8(self.authentication_type as u8);
22587        __tmp.put_u8(self.data_page);
22588        __tmp.put_u8(self.last_page_index);
22589        __tmp.put_u8(self.length);
22590        for val in &self.authentication_data {
22591            __tmp.put_u8(*val);
22592        }
22593        if matches!(version, MavlinkVersion::V2) {
22594            let len = __tmp.len();
22595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22596        } else {
22597            __tmp.len()
22598        }
22599    }
22600}
22601#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22602#[doc = ""]
22603#[doc = "ID: 12900"]
22604#[derive(Debug, Clone, PartialEq)]
22605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22607#[cfg_attr(feature = "ts", derive(TS))]
22608#[cfg_attr(feature = "ts", ts(export))]
22609pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22610    #[doc = "System ID (0 for broadcast)."]
22611    pub target_system: u8,
22612    #[doc = "Component ID (0 for broadcast)."]
22613    pub target_component: u8,
22614    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22617    pub id_or_mac: [u8; 20],
22618    #[doc = "Indicates the format for the uas_id field of this message."]
22619    pub id_type: MavOdidIdType,
22620    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22621    pub ua_type: MavOdidUaType,
22622    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22625    pub uas_id: [u8; 20],
22626}
22627impl OPEN_DRONE_ID_BASIC_ID_DATA {
22628    pub const ENCODED_LEN: usize = 44usize;
22629    pub const DEFAULT: Self = Self {
22630        target_system: 0_u8,
22631        target_component: 0_u8,
22632        id_or_mac: [0_u8; 20usize],
22633        id_type: MavOdidIdType::DEFAULT,
22634        ua_type: MavOdidUaType::DEFAULT,
22635        uas_id: [0_u8; 20usize],
22636    };
22637    #[cfg(feature = "arbitrary")]
22638    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22639        use arbitrary::{Arbitrary, Unstructured};
22640        let mut buf = [0u8; 1024];
22641        rng.fill_bytes(&mut buf);
22642        let mut unstructured = Unstructured::new(&buf);
22643        Self::arbitrary(&mut unstructured).unwrap_or_default()
22644    }
22645}
22646impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22647    fn default() -> Self {
22648        Self::DEFAULT.clone()
22649    }
22650}
22651impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22652    type Message = MavMessage;
22653    const ID: u32 = 12900u32;
22654    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22655    const EXTRA_CRC: u8 = 114u8;
22656    const ENCODED_LEN: usize = 44usize;
22657    fn deser(
22658        _version: MavlinkVersion,
22659        __input: &[u8],
22660    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22661        let avail_len = __input.len();
22662        let mut payload_buf = [0; Self::ENCODED_LEN];
22663        let mut buf = if avail_len < Self::ENCODED_LEN {
22664            payload_buf[0..avail_len].copy_from_slice(__input);
22665            Bytes::new(&payload_buf)
22666        } else {
22667            Bytes::new(__input)
22668        };
22669        let mut __struct = Self::default();
22670        __struct.target_system = buf.get_u8();
22671        __struct.target_component = buf.get_u8();
22672        for v in &mut __struct.id_or_mac {
22673            let val = buf.get_u8();
22674            *v = val;
22675        }
22676        let tmp = buf.get_u8();
22677        __struct.id_type =
22678            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22679                enum_type: "MavOdidIdType",
22680                value: tmp as u64,
22681            })?;
22682        let tmp = buf.get_u8();
22683        __struct.ua_type =
22684            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22685                enum_type: "MavOdidUaType",
22686                value: tmp as u64,
22687            })?;
22688        for v in &mut __struct.uas_id {
22689            let val = buf.get_u8();
22690            *v = val;
22691        }
22692        Ok(__struct)
22693    }
22694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22695        let mut __tmp = BytesMut::new(bytes);
22696        #[allow(clippy::absurd_extreme_comparisons)]
22697        #[allow(unused_comparisons)]
22698        if __tmp.remaining() < Self::ENCODED_LEN {
22699            panic!(
22700                "buffer is too small (need {} bytes, but got {})",
22701                Self::ENCODED_LEN,
22702                __tmp.remaining(),
22703            )
22704        }
22705        __tmp.put_u8(self.target_system);
22706        __tmp.put_u8(self.target_component);
22707        for val in &self.id_or_mac {
22708            __tmp.put_u8(*val);
22709        }
22710        __tmp.put_u8(self.id_type as u8);
22711        __tmp.put_u8(self.ua_type as u8);
22712        for val in &self.uas_id {
22713            __tmp.put_u8(*val);
22714        }
22715        if matches!(version, MavlinkVersion::V2) {
22716            let len = __tmp.len();
22717            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22718        } else {
22719            __tmp.len()
22720        }
22721    }
22722}
22723#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22724#[doc = ""]
22725#[doc = "ID: 12901"]
22726#[derive(Debug, Clone, PartialEq)]
22727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22728#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22729#[cfg_attr(feature = "ts", derive(TS))]
22730#[cfg_attr(feature = "ts", ts(export))]
22731pub struct OPEN_DRONE_ID_LOCATION_DATA {
22732    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22733    pub latitude: i32,
22734    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22735    pub longitude: i32,
22736    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22737    pub altitude_barometric: f32,
22738    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22739    pub altitude_geodetic: f32,
22740    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22741    pub height: f32,
22742    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22743    pub timestamp: f32,
22744    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22745    pub direction: u16,
22746    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22747    pub speed_horizontal: u16,
22748    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22749    pub speed_vertical: i16,
22750    #[doc = "System ID (0 for broadcast)."]
22751    pub target_system: u8,
22752    #[doc = "Component ID (0 for broadcast)."]
22753    pub target_component: u8,
22754    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22755    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22756    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22757    pub id_or_mac: [u8; 20],
22758    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22759    pub status: MavOdidStatus,
22760    #[doc = "Indicates the reference point for the height field."]
22761    pub height_reference: MavOdidHeightRef,
22762    #[doc = "The accuracy of the horizontal position."]
22763    pub horizontal_accuracy: MavOdidHorAcc,
22764    #[doc = "The accuracy of the vertical position."]
22765    pub vertical_accuracy: MavOdidVerAcc,
22766    #[doc = "The accuracy of the barometric altitude."]
22767    pub barometer_accuracy: MavOdidVerAcc,
22768    #[doc = "The accuracy of the horizontal and vertical speed."]
22769    pub speed_accuracy: MavOdidSpeedAcc,
22770    #[doc = "The accuracy of the timestamps."]
22771    pub timestamp_accuracy: MavOdidTimeAcc,
22772}
22773impl OPEN_DRONE_ID_LOCATION_DATA {
22774    pub const ENCODED_LEN: usize = 59usize;
22775    pub const DEFAULT: Self = Self {
22776        latitude: 0_i32,
22777        longitude: 0_i32,
22778        altitude_barometric: 0.0_f32,
22779        altitude_geodetic: 0.0_f32,
22780        height: 0.0_f32,
22781        timestamp: 0.0_f32,
22782        direction: 0_u16,
22783        speed_horizontal: 0_u16,
22784        speed_vertical: 0_i16,
22785        target_system: 0_u8,
22786        target_component: 0_u8,
22787        id_or_mac: [0_u8; 20usize],
22788        status: MavOdidStatus::DEFAULT,
22789        height_reference: MavOdidHeightRef::DEFAULT,
22790        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22791        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22792        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22793        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22794        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22795    };
22796    #[cfg(feature = "arbitrary")]
22797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22798        use arbitrary::{Arbitrary, Unstructured};
22799        let mut buf = [0u8; 1024];
22800        rng.fill_bytes(&mut buf);
22801        let mut unstructured = Unstructured::new(&buf);
22802        Self::arbitrary(&mut unstructured).unwrap_or_default()
22803    }
22804}
22805impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22806    fn default() -> Self {
22807        Self::DEFAULT.clone()
22808    }
22809}
22810impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22811    type Message = MavMessage;
22812    const ID: u32 = 12901u32;
22813    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22814    const EXTRA_CRC: u8 = 254u8;
22815    const ENCODED_LEN: usize = 59usize;
22816    fn deser(
22817        _version: MavlinkVersion,
22818        __input: &[u8],
22819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22820        let avail_len = __input.len();
22821        let mut payload_buf = [0; Self::ENCODED_LEN];
22822        let mut buf = if avail_len < Self::ENCODED_LEN {
22823            payload_buf[0..avail_len].copy_from_slice(__input);
22824            Bytes::new(&payload_buf)
22825        } else {
22826            Bytes::new(__input)
22827        };
22828        let mut __struct = Self::default();
22829        __struct.latitude = buf.get_i32_le();
22830        __struct.longitude = buf.get_i32_le();
22831        __struct.altitude_barometric = buf.get_f32_le();
22832        __struct.altitude_geodetic = buf.get_f32_le();
22833        __struct.height = buf.get_f32_le();
22834        __struct.timestamp = buf.get_f32_le();
22835        __struct.direction = buf.get_u16_le();
22836        __struct.speed_horizontal = buf.get_u16_le();
22837        __struct.speed_vertical = buf.get_i16_le();
22838        __struct.target_system = buf.get_u8();
22839        __struct.target_component = buf.get_u8();
22840        for v in &mut __struct.id_or_mac {
22841            let val = buf.get_u8();
22842            *v = val;
22843        }
22844        let tmp = buf.get_u8();
22845        __struct.status =
22846            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22847                enum_type: "MavOdidStatus",
22848                value: tmp as u64,
22849            })?;
22850        let tmp = buf.get_u8();
22851        __struct.height_reference =
22852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22853                enum_type: "MavOdidHeightRef",
22854                value: tmp as u64,
22855            })?;
22856        let tmp = buf.get_u8();
22857        __struct.horizontal_accuracy =
22858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22859                enum_type: "MavOdidHorAcc",
22860                value: tmp as u64,
22861            })?;
22862        let tmp = buf.get_u8();
22863        __struct.vertical_accuracy =
22864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22865                enum_type: "MavOdidVerAcc",
22866                value: tmp as u64,
22867            })?;
22868        let tmp = buf.get_u8();
22869        __struct.barometer_accuracy =
22870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22871                enum_type: "MavOdidVerAcc",
22872                value: tmp as u64,
22873            })?;
22874        let tmp = buf.get_u8();
22875        __struct.speed_accuracy =
22876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22877                enum_type: "MavOdidSpeedAcc",
22878                value: tmp as u64,
22879            })?;
22880        let tmp = buf.get_u8();
22881        __struct.timestamp_accuracy =
22882            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22883                enum_type: "MavOdidTimeAcc",
22884                value: tmp as u64,
22885            })?;
22886        Ok(__struct)
22887    }
22888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22889        let mut __tmp = BytesMut::new(bytes);
22890        #[allow(clippy::absurd_extreme_comparisons)]
22891        #[allow(unused_comparisons)]
22892        if __tmp.remaining() < Self::ENCODED_LEN {
22893            panic!(
22894                "buffer is too small (need {} bytes, but got {})",
22895                Self::ENCODED_LEN,
22896                __tmp.remaining(),
22897            )
22898        }
22899        __tmp.put_i32_le(self.latitude);
22900        __tmp.put_i32_le(self.longitude);
22901        __tmp.put_f32_le(self.altitude_barometric);
22902        __tmp.put_f32_le(self.altitude_geodetic);
22903        __tmp.put_f32_le(self.height);
22904        __tmp.put_f32_le(self.timestamp);
22905        __tmp.put_u16_le(self.direction);
22906        __tmp.put_u16_le(self.speed_horizontal);
22907        __tmp.put_i16_le(self.speed_vertical);
22908        __tmp.put_u8(self.target_system);
22909        __tmp.put_u8(self.target_component);
22910        for val in &self.id_or_mac {
22911            __tmp.put_u8(*val);
22912        }
22913        __tmp.put_u8(self.status as u8);
22914        __tmp.put_u8(self.height_reference as u8);
22915        __tmp.put_u8(self.horizontal_accuracy as u8);
22916        __tmp.put_u8(self.vertical_accuracy as u8);
22917        __tmp.put_u8(self.barometer_accuracy as u8);
22918        __tmp.put_u8(self.speed_accuracy as u8);
22919        __tmp.put_u8(self.timestamp_accuracy as u8);
22920        if matches!(version, MavlinkVersion::V2) {
22921            let len = __tmp.len();
22922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22923        } else {
22924            __tmp.len()
22925        }
22926    }
22927}
22928#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22929#[doc = ""]
22930#[doc = "ID: 12915"]
22931#[derive(Debug, Clone, PartialEq)]
22932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22934#[cfg_attr(feature = "ts", derive(TS))]
22935#[cfg_attr(feature = "ts", ts(export))]
22936pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22937    #[doc = "System ID (0 for broadcast)."]
22938    pub target_system: u8,
22939    #[doc = "Component ID (0 for broadcast)."]
22940    pub target_component: u8,
22941    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22943    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22944    pub id_or_mac: [u8; 20],
22945    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22946    pub single_message_size: u8,
22947    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22948    pub msg_pack_size: u8,
22949    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22951    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22952    pub messages: [u8; 225],
22953}
22954impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22955    pub const ENCODED_LEN: usize = 249usize;
22956    pub const DEFAULT: Self = Self {
22957        target_system: 0_u8,
22958        target_component: 0_u8,
22959        id_or_mac: [0_u8; 20usize],
22960        single_message_size: 0_u8,
22961        msg_pack_size: 0_u8,
22962        messages: [0_u8; 225usize],
22963    };
22964    #[cfg(feature = "arbitrary")]
22965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22966        use arbitrary::{Arbitrary, Unstructured};
22967        let mut buf = [0u8; 1024];
22968        rng.fill_bytes(&mut buf);
22969        let mut unstructured = Unstructured::new(&buf);
22970        Self::arbitrary(&mut unstructured).unwrap_or_default()
22971    }
22972}
22973impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22974    fn default() -> Self {
22975        Self::DEFAULT.clone()
22976    }
22977}
22978impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22979    type Message = MavMessage;
22980    const ID: u32 = 12915u32;
22981    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22982    const EXTRA_CRC: u8 = 94u8;
22983    const ENCODED_LEN: usize = 249usize;
22984    fn deser(
22985        _version: MavlinkVersion,
22986        __input: &[u8],
22987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22988        let avail_len = __input.len();
22989        let mut payload_buf = [0; Self::ENCODED_LEN];
22990        let mut buf = if avail_len < Self::ENCODED_LEN {
22991            payload_buf[0..avail_len].copy_from_slice(__input);
22992            Bytes::new(&payload_buf)
22993        } else {
22994            Bytes::new(__input)
22995        };
22996        let mut __struct = Self::default();
22997        __struct.target_system = buf.get_u8();
22998        __struct.target_component = buf.get_u8();
22999        for v in &mut __struct.id_or_mac {
23000            let val = buf.get_u8();
23001            *v = val;
23002        }
23003        __struct.single_message_size = buf.get_u8();
23004        __struct.msg_pack_size = buf.get_u8();
23005        for v in &mut __struct.messages {
23006            let val = buf.get_u8();
23007            *v = val;
23008        }
23009        Ok(__struct)
23010    }
23011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23012        let mut __tmp = BytesMut::new(bytes);
23013        #[allow(clippy::absurd_extreme_comparisons)]
23014        #[allow(unused_comparisons)]
23015        if __tmp.remaining() < Self::ENCODED_LEN {
23016            panic!(
23017                "buffer is too small (need {} bytes, but got {})",
23018                Self::ENCODED_LEN,
23019                __tmp.remaining(),
23020            )
23021        }
23022        __tmp.put_u8(self.target_system);
23023        __tmp.put_u8(self.target_component);
23024        for val in &self.id_or_mac {
23025            __tmp.put_u8(*val);
23026        }
23027        __tmp.put_u8(self.single_message_size);
23028        __tmp.put_u8(self.msg_pack_size);
23029        for val in &self.messages {
23030            __tmp.put_u8(*val);
23031        }
23032        if matches!(version, MavlinkVersion::V2) {
23033            let len = __tmp.len();
23034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23035        } else {
23036            __tmp.len()
23037        }
23038    }
23039}
23040#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23041#[doc = ""]
23042#[doc = "ID: 12905"]
23043#[derive(Debug, Clone, PartialEq)]
23044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23046#[cfg_attr(feature = "ts", derive(TS))]
23047#[cfg_attr(feature = "ts", ts(export))]
23048pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23049    #[doc = "System ID (0 for broadcast)."]
23050    pub target_system: u8,
23051    #[doc = "Component ID (0 for broadcast)."]
23052    pub target_component: u8,
23053    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23054    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23055    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23056    pub id_or_mac: [u8; 20],
23057    #[doc = "Indicates the type of the operator_id field."]
23058    pub operator_id_type: MavOdidOperatorIdType,
23059    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23060    #[cfg_attr(feature = "ts", ts(type = "string"))]
23061    pub operator_id: CharArray<20>,
23062}
23063impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23064    pub const ENCODED_LEN: usize = 43usize;
23065    pub const DEFAULT: Self = Self {
23066        target_system: 0_u8,
23067        target_component: 0_u8,
23068        id_or_mac: [0_u8; 20usize],
23069        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23070        operator_id: CharArray::new([0_u8; 20usize]),
23071    };
23072    #[cfg(feature = "arbitrary")]
23073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23074        use arbitrary::{Arbitrary, Unstructured};
23075        let mut buf = [0u8; 1024];
23076        rng.fill_bytes(&mut buf);
23077        let mut unstructured = Unstructured::new(&buf);
23078        Self::arbitrary(&mut unstructured).unwrap_or_default()
23079    }
23080}
23081impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23082    fn default() -> Self {
23083        Self::DEFAULT.clone()
23084    }
23085}
23086impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23087    type Message = MavMessage;
23088    const ID: u32 = 12905u32;
23089    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23090    const EXTRA_CRC: u8 = 49u8;
23091    const ENCODED_LEN: usize = 43usize;
23092    fn deser(
23093        _version: MavlinkVersion,
23094        __input: &[u8],
23095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23096        let avail_len = __input.len();
23097        let mut payload_buf = [0; Self::ENCODED_LEN];
23098        let mut buf = if avail_len < Self::ENCODED_LEN {
23099            payload_buf[0..avail_len].copy_from_slice(__input);
23100            Bytes::new(&payload_buf)
23101        } else {
23102            Bytes::new(__input)
23103        };
23104        let mut __struct = Self::default();
23105        __struct.target_system = buf.get_u8();
23106        __struct.target_component = buf.get_u8();
23107        for v in &mut __struct.id_or_mac {
23108            let val = buf.get_u8();
23109            *v = val;
23110        }
23111        let tmp = buf.get_u8();
23112        __struct.operator_id_type =
23113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23114                enum_type: "MavOdidOperatorIdType",
23115                value: tmp as u64,
23116            })?;
23117        let mut tmp = [0_u8; 20usize];
23118        for v in &mut tmp {
23119            *v = buf.get_u8();
23120        }
23121        __struct.operator_id = CharArray::new(tmp);
23122        Ok(__struct)
23123    }
23124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23125        let mut __tmp = BytesMut::new(bytes);
23126        #[allow(clippy::absurd_extreme_comparisons)]
23127        #[allow(unused_comparisons)]
23128        if __tmp.remaining() < Self::ENCODED_LEN {
23129            panic!(
23130                "buffer is too small (need {} bytes, but got {})",
23131                Self::ENCODED_LEN,
23132                __tmp.remaining(),
23133            )
23134        }
23135        __tmp.put_u8(self.target_system);
23136        __tmp.put_u8(self.target_component);
23137        for val in &self.id_or_mac {
23138            __tmp.put_u8(*val);
23139        }
23140        __tmp.put_u8(self.operator_id_type as u8);
23141        for val in &self.operator_id {
23142            __tmp.put_u8(*val);
23143        }
23144        if matches!(version, MavlinkVersion::V2) {
23145            let len = __tmp.len();
23146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23147        } else {
23148            __tmp.len()
23149        }
23150    }
23151}
23152#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23153#[doc = ""]
23154#[doc = "ID: 12903"]
23155#[derive(Debug, Clone, PartialEq)]
23156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23158#[cfg_attr(feature = "ts", derive(TS))]
23159#[cfg_attr(feature = "ts", ts(export))]
23160pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23161    #[doc = "System ID (0 for broadcast)."]
23162    pub target_system: u8,
23163    #[doc = "Component ID (0 for broadcast)."]
23164    pub target_component: u8,
23165    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23168    pub id_or_mac: [u8; 20],
23169    #[doc = "Indicates the type of the description field."]
23170    pub description_type: MavOdidDescType,
23171    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23172    #[cfg_attr(feature = "ts", ts(type = "string"))]
23173    pub description: CharArray<23>,
23174}
23175impl OPEN_DRONE_ID_SELF_ID_DATA {
23176    pub const ENCODED_LEN: usize = 46usize;
23177    pub const DEFAULT: Self = Self {
23178        target_system: 0_u8,
23179        target_component: 0_u8,
23180        id_or_mac: [0_u8; 20usize],
23181        description_type: MavOdidDescType::DEFAULT,
23182        description: CharArray::new([0_u8; 23usize]),
23183    };
23184    #[cfg(feature = "arbitrary")]
23185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23186        use arbitrary::{Arbitrary, Unstructured};
23187        let mut buf = [0u8; 1024];
23188        rng.fill_bytes(&mut buf);
23189        let mut unstructured = Unstructured::new(&buf);
23190        Self::arbitrary(&mut unstructured).unwrap_or_default()
23191    }
23192}
23193impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23194    fn default() -> Self {
23195        Self::DEFAULT.clone()
23196    }
23197}
23198impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23199    type Message = MavMessage;
23200    const ID: u32 = 12903u32;
23201    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23202    const EXTRA_CRC: u8 = 249u8;
23203    const ENCODED_LEN: usize = 46usize;
23204    fn deser(
23205        _version: MavlinkVersion,
23206        __input: &[u8],
23207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23208        let avail_len = __input.len();
23209        let mut payload_buf = [0; Self::ENCODED_LEN];
23210        let mut buf = if avail_len < Self::ENCODED_LEN {
23211            payload_buf[0..avail_len].copy_from_slice(__input);
23212            Bytes::new(&payload_buf)
23213        } else {
23214            Bytes::new(__input)
23215        };
23216        let mut __struct = Self::default();
23217        __struct.target_system = buf.get_u8();
23218        __struct.target_component = buf.get_u8();
23219        for v in &mut __struct.id_or_mac {
23220            let val = buf.get_u8();
23221            *v = val;
23222        }
23223        let tmp = buf.get_u8();
23224        __struct.description_type =
23225            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23226                enum_type: "MavOdidDescType",
23227                value: tmp as u64,
23228            })?;
23229        let mut tmp = [0_u8; 23usize];
23230        for v in &mut tmp {
23231            *v = buf.get_u8();
23232        }
23233        __struct.description = CharArray::new(tmp);
23234        Ok(__struct)
23235    }
23236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23237        let mut __tmp = BytesMut::new(bytes);
23238        #[allow(clippy::absurd_extreme_comparisons)]
23239        #[allow(unused_comparisons)]
23240        if __tmp.remaining() < Self::ENCODED_LEN {
23241            panic!(
23242                "buffer is too small (need {} bytes, but got {})",
23243                Self::ENCODED_LEN,
23244                __tmp.remaining(),
23245            )
23246        }
23247        __tmp.put_u8(self.target_system);
23248        __tmp.put_u8(self.target_component);
23249        for val in &self.id_or_mac {
23250            __tmp.put_u8(*val);
23251        }
23252        __tmp.put_u8(self.description_type as u8);
23253        for val in &self.description {
23254            __tmp.put_u8(*val);
23255        }
23256        if matches!(version, MavlinkVersion::V2) {
23257            let len = __tmp.len();
23258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23259        } else {
23260            __tmp.len()
23261        }
23262    }
23263}
23264#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23265#[doc = ""]
23266#[doc = "ID: 12904"]
23267#[derive(Debug, Clone, PartialEq)]
23268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23270#[cfg_attr(feature = "ts", derive(TS))]
23271#[cfg_attr(feature = "ts", ts(export))]
23272pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23273    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23274    pub operator_latitude: i32,
23275    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23276    pub operator_longitude: i32,
23277    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23278    pub area_ceiling: f32,
23279    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23280    pub area_floor: f32,
23281    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23282    pub operator_altitude_geo: f32,
23283    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23284    pub timestamp: u32,
23285    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23286    pub area_count: u16,
23287    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23288    pub area_radius: u16,
23289    #[doc = "System ID (0 for broadcast)."]
23290    pub target_system: u8,
23291    #[doc = "Component ID (0 for broadcast)."]
23292    pub target_component: u8,
23293    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23294    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23295    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23296    pub id_or_mac: [u8; 20],
23297    #[doc = "Specifies the operator location type."]
23298    pub operator_location_type: MavOdidOperatorLocationType,
23299    #[doc = "Specifies the classification type of the UA."]
23300    pub classification_type: MavOdidClassificationType,
23301    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23302    pub category_eu: MavOdidCategoryEu,
23303    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23304    pub class_eu: MavOdidClassEu,
23305}
23306impl OPEN_DRONE_ID_SYSTEM_DATA {
23307    pub const ENCODED_LEN: usize = 54usize;
23308    pub const DEFAULT: Self = Self {
23309        operator_latitude: 0_i32,
23310        operator_longitude: 0_i32,
23311        area_ceiling: 0.0_f32,
23312        area_floor: 0.0_f32,
23313        operator_altitude_geo: 0.0_f32,
23314        timestamp: 0_u32,
23315        area_count: 0_u16,
23316        area_radius: 0_u16,
23317        target_system: 0_u8,
23318        target_component: 0_u8,
23319        id_or_mac: [0_u8; 20usize],
23320        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23321        classification_type: MavOdidClassificationType::DEFAULT,
23322        category_eu: MavOdidCategoryEu::DEFAULT,
23323        class_eu: MavOdidClassEu::DEFAULT,
23324    };
23325    #[cfg(feature = "arbitrary")]
23326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23327        use arbitrary::{Arbitrary, Unstructured};
23328        let mut buf = [0u8; 1024];
23329        rng.fill_bytes(&mut buf);
23330        let mut unstructured = Unstructured::new(&buf);
23331        Self::arbitrary(&mut unstructured).unwrap_or_default()
23332    }
23333}
23334impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23335    fn default() -> Self {
23336        Self::DEFAULT.clone()
23337    }
23338}
23339impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23340    type Message = MavMessage;
23341    const ID: u32 = 12904u32;
23342    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23343    const EXTRA_CRC: u8 = 77u8;
23344    const ENCODED_LEN: usize = 54usize;
23345    fn deser(
23346        _version: MavlinkVersion,
23347        __input: &[u8],
23348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23349        let avail_len = __input.len();
23350        let mut payload_buf = [0; Self::ENCODED_LEN];
23351        let mut buf = if avail_len < Self::ENCODED_LEN {
23352            payload_buf[0..avail_len].copy_from_slice(__input);
23353            Bytes::new(&payload_buf)
23354        } else {
23355            Bytes::new(__input)
23356        };
23357        let mut __struct = Self::default();
23358        __struct.operator_latitude = buf.get_i32_le();
23359        __struct.operator_longitude = buf.get_i32_le();
23360        __struct.area_ceiling = buf.get_f32_le();
23361        __struct.area_floor = buf.get_f32_le();
23362        __struct.operator_altitude_geo = buf.get_f32_le();
23363        __struct.timestamp = buf.get_u32_le();
23364        __struct.area_count = buf.get_u16_le();
23365        __struct.area_radius = buf.get_u16_le();
23366        __struct.target_system = buf.get_u8();
23367        __struct.target_component = buf.get_u8();
23368        for v in &mut __struct.id_or_mac {
23369            let val = buf.get_u8();
23370            *v = val;
23371        }
23372        let tmp = buf.get_u8();
23373        __struct.operator_location_type =
23374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23375                enum_type: "MavOdidOperatorLocationType",
23376                value: tmp as u64,
23377            })?;
23378        let tmp = buf.get_u8();
23379        __struct.classification_type =
23380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23381                enum_type: "MavOdidClassificationType",
23382                value: tmp as u64,
23383            })?;
23384        let tmp = buf.get_u8();
23385        __struct.category_eu =
23386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23387                enum_type: "MavOdidCategoryEu",
23388                value: tmp as u64,
23389            })?;
23390        let tmp = buf.get_u8();
23391        __struct.class_eu =
23392            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23393                enum_type: "MavOdidClassEu",
23394                value: tmp as u64,
23395            })?;
23396        Ok(__struct)
23397    }
23398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23399        let mut __tmp = BytesMut::new(bytes);
23400        #[allow(clippy::absurd_extreme_comparisons)]
23401        #[allow(unused_comparisons)]
23402        if __tmp.remaining() < Self::ENCODED_LEN {
23403            panic!(
23404                "buffer is too small (need {} bytes, but got {})",
23405                Self::ENCODED_LEN,
23406                __tmp.remaining(),
23407            )
23408        }
23409        __tmp.put_i32_le(self.operator_latitude);
23410        __tmp.put_i32_le(self.operator_longitude);
23411        __tmp.put_f32_le(self.area_ceiling);
23412        __tmp.put_f32_le(self.area_floor);
23413        __tmp.put_f32_le(self.operator_altitude_geo);
23414        __tmp.put_u32_le(self.timestamp);
23415        __tmp.put_u16_le(self.area_count);
23416        __tmp.put_u16_le(self.area_radius);
23417        __tmp.put_u8(self.target_system);
23418        __tmp.put_u8(self.target_component);
23419        for val in &self.id_or_mac {
23420            __tmp.put_u8(*val);
23421        }
23422        __tmp.put_u8(self.operator_location_type as u8);
23423        __tmp.put_u8(self.classification_type as u8);
23424        __tmp.put_u8(self.category_eu as u8);
23425        __tmp.put_u8(self.class_eu as u8);
23426        if matches!(version, MavlinkVersion::V2) {
23427            let len = __tmp.len();
23428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23429        } else {
23430            __tmp.len()
23431        }
23432    }
23433}
23434#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23435#[doc = ""]
23436#[doc = "ID: 12919"]
23437#[derive(Debug, Clone, PartialEq)]
23438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23440#[cfg_attr(feature = "ts", derive(TS))]
23441#[cfg_attr(feature = "ts", ts(export))]
23442pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23443    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23444    pub operator_latitude: i32,
23445    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23446    pub operator_longitude: i32,
23447    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23448    pub operator_altitude_geo: f32,
23449    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23450    pub timestamp: u32,
23451    #[doc = "System ID (0 for broadcast)."]
23452    pub target_system: u8,
23453    #[doc = "Component ID (0 for broadcast)."]
23454    pub target_component: u8,
23455}
23456impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23457    pub const ENCODED_LEN: usize = 18usize;
23458    pub const DEFAULT: Self = Self {
23459        operator_latitude: 0_i32,
23460        operator_longitude: 0_i32,
23461        operator_altitude_geo: 0.0_f32,
23462        timestamp: 0_u32,
23463        target_system: 0_u8,
23464        target_component: 0_u8,
23465    };
23466    #[cfg(feature = "arbitrary")]
23467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23468        use arbitrary::{Arbitrary, Unstructured};
23469        let mut buf = [0u8; 1024];
23470        rng.fill_bytes(&mut buf);
23471        let mut unstructured = Unstructured::new(&buf);
23472        Self::arbitrary(&mut unstructured).unwrap_or_default()
23473    }
23474}
23475impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23476    fn default() -> Self {
23477        Self::DEFAULT.clone()
23478    }
23479}
23480impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23481    type Message = MavMessage;
23482    const ID: u32 = 12919u32;
23483    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23484    const EXTRA_CRC: u8 = 7u8;
23485    const ENCODED_LEN: usize = 18usize;
23486    fn deser(
23487        _version: MavlinkVersion,
23488        __input: &[u8],
23489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23490        let avail_len = __input.len();
23491        let mut payload_buf = [0; Self::ENCODED_LEN];
23492        let mut buf = if avail_len < Self::ENCODED_LEN {
23493            payload_buf[0..avail_len].copy_from_slice(__input);
23494            Bytes::new(&payload_buf)
23495        } else {
23496            Bytes::new(__input)
23497        };
23498        let mut __struct = Self::default();
23499        __struct.operator_latitude = buf.get_i32_le();
23500        __struct.operator_longitude = buf.get_i32_le();
23501        __struct.operator_altitude_geo = buf.get_f32_le();
23502        __struct.timestamp = buf.get_u32_le();
23503        __struct.target_system = buf.get_u8();
23504        __struct.target_component = buf.get_u8();
23505        Ok(__struct)
23506    }
23507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23508        let mut __tmp = BytesMut::new(bytes);
23509        #[allow(clippy::absurd_extreme_comparisons)]
23510        #[allow(unused_comparisons)]
23511        if __tmp.remaining() < Self::ENCODED_LEN {
23512            panic!(
23513                "buffer is too small (need {} bytes, but got {})",
23514                Self::ENCODED_LEN,
23515                __tmp.remaining(),
23516            )
23517        }
23518        __tmp.put_i32_le(self.operator_latitude);
23519        __tmp.put_i32_le(self.operator_longitude);
23520        __tmp.put_f32_le(self.operator_altitude_geo);
23521        __tmp.put_u32_le(self.timestamp);
23522        __tmp.put_u8(self.target_system);
23523        __tmp.put_u8(self.target_component);
23524        if matches!(version, MavlinkVersion::V2) {
23525            let len = __tmp.len();
23526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23527        } else {
23528            __tmp.len()
23529        }
23530    }
23531}
23532#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23533#[doc = ""]
23534#[doc = "ID: 100"]
23535#[derive(Debug, Clone, PartialEq)]
23536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23538#[cfg_attr(feature = "ts", derive(TS))]
23539#[cfg_attr(feature = "ts", ts(export))]
23540pub struct OPTICAL_FLOW_DATA {
23541    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23542    pub time_usec: u64,
23543    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23544    pub flow_comp_m_x: f32,
23545    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23546    pub flow_comp_m_y: f32,
23547    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23548    pub ground_distance: f32,
23549    #[doc = "Flow in x-sensor direction"]
23550    pub flow_x: i16,
23551    #[doc = "Flow in y-sensor direction"]
23552    pub flow_y: i16,
23553    #[doc = "Sensor ID"]
23554    pub sensor_id: u8,
23555    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23556    pub quality: u8,
23557    #[doc = "Flow rate about X axis"]
23558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23559    pub flow_rate_x: f32,
23560    #[doc = "Flow rate about Y axis"]
23561    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23562    pub flow_rate_y: f32,
23563}
23564impl OPTICAL_FLOW_DATA {
23565    pub const ENCODED_LEN: usize = 34usize;
23566    pub const DEFAULT: Self = Self {
23567        time_usec: 0_u64,
23568        flow_comp_m_x: 0.0_f32,
23569        flow_comp_m_y: 0.0_f32,
23570        ground_distance: 0.0_f32,
23571        flow_x: 0_i16,
23572        flow_y: 0_i16,
23573        sensor_id: 0_u8,
23574        quality: 0_u8,
23575        flow_rate_x: 0.0_f32,
23576        flow_rate_y: 0.0_f32,
23577    };
23578    #[cfg(feature = "arbitrary")]
23579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23580        use arbitrary::{Arbitrary, Unstructured};
23581        let mut buf = [0u8; 1024];
23582        rng.fill_bytes(&mut buf);
23583        let mut unstructured = Unstructured::new(&buf);
23584        Self::arbitrary(&mut unstructured).unwrap_or_default()
23585    }
23586}
23587impl Default for OPTICAL_FLOW_DATA {
23588    fn default() -> Self {
23589        Self::DEFAULT.clone()
23590    }
23591}
23592impl MessageData for OPTICAL_FLOW_DATA {
23593    type Message = MavMessage;
23594    const ID: u32 = 100u32;
23595    const NAME: &'static str = "OPTICAL_FLOW";
23596    const EXTRA_CRC: u8 = 175u8;
23597    const ENCODED_LEN: usize = 34usize;
23598    fn deser(
23599        _version: MavlinkVersion,
23600        __input: &[u8],
23601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23602        let avail_len = __input.len();
23603        let mut payload_buf = [0; Self::ENCODED_LEN];
23604        let mut buf = if avail_len < Self::ENCODED_LEN {
23605            payload_buf[0..avail_len].copy_from_slice(__input);
23606            Bytes::new(&payload_buf)
23607        } else {
23608            Bytes::new(__input)
23609        };
23610        let mut __struct = Self::default();
23611        __struct.time_usec = buf.get_u64_le();
23612        __struct.flow_comp_m_x = buf.get_f32_le();
23613        __struct.flow_comp_m_y = buf.get_f32_le();
23614        __struct.ground_distance = buf.get_f32_le();
23615        __struct.flow_x = buf.get_i16_le();
23616        __struct.flow_y = buf.get_i16_le();
23617        __struct.sensor_id = buf.get_u8();
23618        __struct.quality = buf.get_u8();
23619        __struct.flow_rate_x = buf.get_f32_le();
23620        __struct.flow_rate_y = buf.get_f32_le();
23621        Ok(__struct)
23622    }
23623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23624        let mut __tmp = BytesMut::new(bytes);
23625        #[allow(clippy::absurd_extreme_comparisons)]
23626        #[allow(unused_comparisons)]
23627        if __tmp.remaining() < Self::ENCODED_LEN {
23628            panic!(
23629                "buffer is too small (need {} bytes, but got {})",
23630                Self::ENCODED_LEN,
23631                __tmp.remaining(),
23632            )
23633        }
23634        __tmp.put_u64_le(self.time_usec);
23635        __tmp.put_f32_le(self.flow_comp_m_x);
23636        __tmp.put_f32_le(self.flow_comp_m_y);
23637        __tmp.put_f32_le(self.ground_distance);
23638        __tmp.put_i16_le(self.flow_x);
23639        __tmp.put_i16_le(self.flow_y);
23640        __tmp.put_u8(self.sensor_id);
23641        __tmp.put_u8(self.quality);
23642        if matches!(version, MavlinkVersion::V2) {
23643            __tmp.put_f32_le(self.flow_rate_x);
23644            __tmp.put_f32_le(self.flow_rate_y);
23645            let len = __tmp.len();
23646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23647        } else {
23648            __tmp.len()
23649        }
23650    }
23651}
23652#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23653#[doc = ""]
23654#[doc = "ID: 106"]
23655#[derive(Debug, Clone, PartialEq)]
23656#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23658#[cfg_attr(feature = "ts", derive(TS))]
23659#[cfg_attr(feature = "ts", ts(export))]
23660pub struct OPTICAL_FLOW_RAD_DATA {
23661    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23662    pub time_usec: u64,
23663    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23664    pub integration_time_us: u32,
23665    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23666    pub integrated_x: f32,
23667    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23668    pub integrated_y: f32,
23669    #[doc = "RH rotation around X axis"]
23670    pub integrated_xgyro: f32,
23671    #[doc = "RH rotation around Y axis"]
23672    pub integrated_ygyro: f32,
23673    #[doc = "RH rotation around Z axis"]
23674    pub integrated_zgyro: f32,
23675    #[doc = "Time since the distance was sampled."]
23676    pub time_delta_distance_us: u32,
23677    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23678    pub distance: f32,
23679    #[doc = "Temperature"]
23680    pub temperature: i16,
23681    #[doc = "Sensor ID"]
23682    pub sensor_id: u8,
23683    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23684    pub quality: u8,
23685}
23686impl OPTICAL_FLOW_RAD_DATA {
23687    pub const ENCODED_LEN: usize = 44usize;
23688    pub const DEFAULT: Self = Self {
23689        time_usec: 0_u64,
23690        integration_time_us: 0_u32,
23691        integrated_x: 0.0_f32,
23692        integrated_y: 0.0_f32,
23693        integrated_xgyro: 0.0_f32,
23694        integrated_ygyro: 0.0_f32,
23695        integrated_zgyro: 0.0_f32,
23696        time_delta_distance_us: 0_u32,
23697        distance: 0.0_f32,
23698        temperature: 0_i16,
23699        sensor_id: 0_u8,
23700        quality: 0_u8,
23701    };
23702    #[cfg(feature = "arbitrary")]
23703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23704        use arbitrary::{Arbitrary, Unstructured};
23705        let mut buf = [0u8; 1024];
23706        rng.fill_bytes(&mut buf);
23707        let mut unstructured = Unstructured::new(&buf);
23708        Self::arbitrary(&mut unstructured).unwrap_or_default()
23709    }
23710}
23711impl Default for OPTICAL_FLOW_RAD_DATA {
23712    fn default() -> Self {
23713        Self::DEFAULT.clone()
23714    }
23715}
23716impl MessageData for OPTICAL_FLOW_RAD_DATA {
23717    type Message = MavMessage;
23718    const ID: u32 = 106u32;
23719    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23720    const EXTRA_CRC: u8 = 138u8;
23721    const ENCODED_LEN: usize = 44usize;
23722    fn deser(
23723        _version: MavlinkVersion,
23724        __input: &[u8],
23725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23726        let avail_len = __input.len();
23727        let mut payload_buf = [0; Self::ENCODED_LEN];
23728        let mut buf = if avail_len < Self::ENCODED_LEN {
23729            payload_buf[0..avail_len].copy_from_slice(__input);
23730            Bytes::new(&payload_buf)
23731        } else {
23732            Bytes::new(__input)
23733        };
23734        let mut __struct = Self::default();
23735        __struct.time_usec = buf.get_u64_le();
23736        __struct.integration_time_us = buf.get_u32_le();
23737        __struct.integrated_x = buf.get_f32_le();
23738        __struct.integrated_y = buf.get_f32_le();
23739        __struct.integrated_xgyro = buf.get_f32_le();
23740        __struct.integrated_ygyro = buf.get_f32_le();
23741        __struct.integrated_zgyro = buf.get_f32_le();
23742        __struct.time_delta_distance_us = buf.get_u32_le();
23743        __struct.distance = buf.get_f32_le();
23744        __struct.temperature = buf.get_i16_le();
23745        __struct.sensor_id = buf.get_u8();
23746        __struct.quality = buf.get_u8();
23747        Ok(__struct)
23748    }
23749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23750        let mut __tmp = BytesMut::new(bytes);
23751        #[allow(clippy::absurd_extreme_comparisons)]
23752        #[allow(unused_comparisons)]
23753        if __tmp.remaining() < Self::ENCODED_LEN {
23754            panic!(
23755                "buffer is too small (need {} bytes, but got {})",
23756                Self::ENCODED_LEN,
23757                __tmp.remaining(),
23758            )
23759        }
23760        __tmp.put_u64_le(self.time_usec);
23761        __tmp.put_u32_le(self.integration_time_us);
23762        __tmp.put_f32_le(self.integrated_x);
23763        __tmp.put_f32_le(self.integrated_y);
23764        __tmp.put_f32_le(self.integrated_xgyro);
23765        __tmp.put_f32_le(self.integrated_ygyro);
23766        __tmp.put_f32_le(self.integrated_zgyro);
23767        __tmp.put_u32_le(self.time_delta_distance_us);
23768        __tmp.put_f32_le(self.distance);
23769        __tmp.put_i16_le(self.temperature);
23770        __tmp.put_u8(self.sensor_id);
23771        __tmp.put_u8(self.quality);
23772        if matches!(version, MavlinkVersion::V2) {
23773            let len = __tmp.len();
23774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23775        } else {
23776            __tmp.len()
23777        }
23778    }
23779}
23780#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23781#[doc = ""]
23782#[doc = "ID: 360"]
23783#[derive(Debug, Clone, PartialEq)]
23784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23786#[cfg_attr(feature = "ts", derive(TS))]
23787#[cfg_attr(feature = "ts", ts(export))]
23788pub struct ORBIT_EXECUTION_STATUS_DATA {
23789    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23790    pub time_usec: u64,
23791    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23792    pub radius: f32,
23793    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23794    pub x: i32,
23795    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23796    pub y: i32,
23797    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23798    pub z: f32,
23799    #[doc = "The coordinate system of the fields: x, y, z."]
23800    pub frame: MavFrame,
23801}
23802impl ORBIT_EXECUTION_STATUS_DATA {
23803    pub const ENCODED_LEN: usize = 25usize;
23804    pub const DEFAULT: Self = Self {
23805        time_usec: 0_u64,
23806        radius: 0.0_f32,
23807        x: 0_i32,
23808        y: 0_i32,
23809        z: 0.0_f32,
23810        frame: MavFrame::DEFAULT,
23811    };
23812    #[cfg(feature = "arbitrary")]
23813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23814        use arbitrary::{Arbitrary, Unstructured};
23815        let mut buf = [0u8; 1024];
23816        rng.fill_bytes(&mut buf);
23817        let mut unstructured = Unstructured::new(&buf);
23818        Self::arbitrary(&mut unstructured).unwrap_or_default()
23819    }
23820}
23821impl Default for ORBIT_EXECUTION_STATUS_DATA {
23822    fn default() -> Self {
23823        Self::DEFAULT.clone()
23824    }
23825}
23826impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23827    type Message = MavMessage;
23828    const ID: u32 = 360u32;
23829    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23830    const EXTRA_CRC: u8 = 11u8;
23831    const ENCODED_LEN: usize = 25usize;
23832    fn deser(
23833        _version: MavlinkVersion,
23834        __input: &[u8],
23835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23836        let avail_len = __input.len();
23837        let mut payload_buf = [0; Self::ENCODED_LEN];
23838        let mut buf = if avail_len < Self::ENCODED_LEN {
23839            payload_buf[0..avail_len].copy_from_slice(__input);
23840            Bytes::new(&payload_buf)
23841        } else {
23842            Bytes::new(__input)
23843        };
23844        let mut __struct = Self::default();
23845        __struct.time_usec = buf.get_u64_le();
23846        __struct.radius = buf.get_f32_le();
23847        __struct.x = buf.get_i32_le();
23848        __struct.y = buf.get_i32_le();
23849        __struct.z = buf.get_f32_le();
23850        let tmp = buf.get_u8();
23851        __struct.frame =
23852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23853                enum_type: "MavFrame",
23854                value: tmp as u64,
23855            })?;
23856        Ok(__struct)
23857    }
23858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23859        let mut __tmp = BytesMut::new(bytes);
23860        #[allow(clippy::absurd_extreme_comparisons)]
23861        #[allow(unused_comparisons)]
23862        if __tmp.remaining() < Self::ENCODED_LEN {
23863            panic!(
23864                "buffer is too small (need {} bytes, but got {})",
23865                Self::ENCODED_LEN,
23866                __tmp.remaining(),
23867            )
23868        }
23869        __tmp.put_u64_le(self.time_usec);
23870        __tmp.put_f32_le(self.radius);
23871        __tmp.put_i32_le(self.x);
23872        __tmp.put_i32_le(self.y);
23873        __tmp.put_f32_le(self.z);
23874        __tmp.put_u8(self.frame as u8);
23875        if matches!(version, MavlinkVersion::V2) {
23876            let len = __tmp.len();
23877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23878        } else {
23879            __tmp.len()
23880        }
23881    }
23882}
23883#[doc = "Response from a PARAM_EXT_SET message."]
23884#[doc = ""]
23885#[doc = "ID: 324"]
23886#[derive(Debug, Clone, PartialEq)]
23887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23889#[cfg_attr(feature = "ts", derive(TS))]
23890#[cfg_attr(feature = "ts", ts(export))]
23891pub struct PARAM_EXT_ACK_DATA {
23892    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23893    #[cfg_attr(feature = "ts", ts(type = "string"))]
23894    pub param_id: CharArray<16>,
23895    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23896    #[cfg_attr(feature = "ts", ts(type = "string"))]
23897    pub param_value: CharArray<128>,
23898    #[doc = "Parameter type."]
23899    pub param_type: MavParamExtType,
23900    #[doc = "Result code."]
23901    pub param_result: ParamAck,
23902}
23903impl PARAM_EXT_ACK_DATA {
23904    pub const ENCODED_LEN: usize = 146usize;
23905    pub const DEFAULT: Self = Self {
23906        param_id: CharArray::new([0_u8; 16usize]),
23907        param_value: CharArray::new([0_u8; 128usize]),
23908        param_type: MavParamExtType::DEFAULT,
23909        param_result: ParamAck::DEFAULT,
23910    };
23911    #[cfg(feature = "arbitrary")]
23912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23913        use arbitrary::{Arbitrary, Unstructured};
23914        let mut buf = [0u8; 1024];
23915        rng.fill_bytes(&mut buf);
23916        let mut unstructured = Unstructured::new(&buf);
23917        Self::arbitrary(&mut unstructured).unwrap_or_default()
23918    }
23919}
23920impl Default for PARAM_EXT_ACK_DATA {
23921    fn default() -> Self {
23922        Self::DEFAULT.clone()
23923    }
23924}
23925impl MessageData for PARAM_EXT_ACK_DATA {
23926    type Message = MavMessage;
23927    const ID: u32 = 324u32;
23928    const NAME: &'static str = "PARAM_EXT_ACK";
23929    const EXTRA_CRC: u8 = 132u8;
23930    const ENCODED_LEN: usize = 146usize;
23931    fn deser(
23932        _version: MavlinkVersion,
23933        __input: &[u8],
23934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23935        let avail_len = __input.len();
23936        let mut payload_buf = [0; Self::ENCODED_LEN];
23937        let mut buf = if avail_len < Self::ENCODED_LEN {
23938            payload_buf[0..avail_len].copy_from_slice(__input);
23939            Bytes::new(&payload_buf)
23940        } else {
23941            Bytes::new(__input)
23942        };
23943        let mut __struct = Self::default();
23944        let mut tmp = [0_u8; 16usize];
23945        for v in &mut tmp {
23946            *v = buf.get_u8();
23947        }
23948        __struct.param_id = CharArray::new(tmp);
23949        let mut tmp = [0_u8; 128usize];
23950        for v in &mut tmp {
23951            *v = buf.get_u8();
23952        }
23953        __struct.param_value = CharArray::new(tmp);
23954        let tmp = buf.get_u8();
23955        __struct.param_type =
23956            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23957                enum_type: "MavParamExtType",
23958                value: tmp as u64,
23959            })?;
23960        let tmp = buf.get_u8();
23961        __struct.param_result =
23962            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23963                enum_type: "ParamAck",
23964                value: tmp as u64,
23965            })?;
23966        Ok(__struct)
23967    }
23968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23969        let mut __tmp = BytesMut::new(bytes);
23970        #[allow(clippy::absurd_extreme_comparisons)]
23971        #[allow(unused_comparisons)]
23972        if __tmp.remaining() < Self::ENCODED_LEN {
23973            panic!(
23974                "buffer is too small (need {} bytes, but got {})",
23975                Self::ENCODED_LEN,
23976                __tmp.remaining(),
23977            )
23978        }
23979        for val in &self.param_id {
23980            __tmp.put_u8(*val);
23981        }
23982        for val in &self.param_value {
23983            __tmp.put_u8(*val);
23984        }
23985        __tmp.put_u8(self.param_type as u8);
23986        __tmp.put_u8(self.param_result as u8);
23987        if matches!(version, MavlinkVersion::V2) {
23988            let len = __tmp.len();
23989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23990        } else {
23991            __tmp.len()
23992        }
23993    }
23994}
23995#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23996#[doc = ""]
23997#[doc = "ID: 321"]
23998#[derive(Debug, Clone, PartialEq)]
23999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24001#[cfg_attr(feature = "ts", derive(TS))]
24002#[cfg_attr(feature = "ts", ts(export))]
24003pub struct PARAM_EXT_REQUEST_LIST_DATA {
24004    #[doc = "System ID"]
24005    pub target_system: u8,
24006    #[doc = "Component ID"]
24007    pub target_component: u8,
24008}
24009impl PARAM_EXT_REQUEST_LIST_DATA {
24010    pub const ENCODED_LEN: usize = 2usize;
24011    pub const DEFAULT: Self = Self {
24012        target_system: 0_u8,
24013        target_component: 0_u8,
24014    };
24015    #[cfg(feature = "arbitrary")]
24016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24017        use arbitrary::{Arbitrary, Unstructured};
24018        let mut buf = [0u8; 1024];
24019        rng.fill_bytes(&mut buf);
24020        let mut unstructured = Unstructured::new(&buf);
24021        Self::arbitrary(&mut unstructured).unwrap_or_default()
24022    }
24023}
24024impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24025    fn default() -> Self {
24026        Self::DEFAULT.clone()
24027    }
24028}
24029impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24030    type Message = MavMessage;
24031    const ID: u32 = 321u32;
24032    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24033    const EXTRA_CRC: u8 = 88u8;
24034    const ENCODED_LEN: usize = 2usize;
24035    fn deser(
24036        _version: MavlinkVersion,
24037        __input: &[u8],
24038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24039        let avail_len = __input.len();
24040        let mut payload_buf = [0; Self::ENCODED_LEN];
24041        let mut buf = if avail_len < Self::ENCODED_LEN {
24042            payload_buf[0..avail_len].copy_from_slice(__input);
24043            Bytes::new(&payload_buf)
24044        } else {
24045            Bytes::new(__input)
24046        };
24047        let mut __struct = Self::default();
24048        __struct.target_system = buf.get_u8();
24049        __struct.target_component = buf.get_u8();
24050        Ok(__struct)
24051    }
24052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24053        let mut __tmp = BytesMut::new(bytes);
24054        #[allow(clippy::absurd_extreme_comparisons)]
24055        #[allow(unused_comparisons)]
24056        if __tmp.remaining() < Self::ENCODED_LEN {
24057            panic!(
24058                "buffer is too small (need {} bytes, but got {})",
24059                Self::ENCODED_LEN,
24060                __tmp.remaining(),
24061            )
24062        }
24063        __tmp.put_u8(self.target_system);
24064        __tmp.put_u8(self.target_component);
24065        if matches!(version, MavlinkVersion::V2) {
24066            let len = __tmp.len();
24067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24068        } else {
24069            __tmp.len()
24070        }
24071    }
24072}
24073#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24074#[doc = ""]
24075#[doc = "ID: 320"]
24076#[derive(Debug, Clone, PartialEq)]
24077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24079#[cfg_attr(feature = "ts", derive(TS))]
24080#[cfg_attr(feature = "ts", ts(export))]
24081pub struct PARAM_EXT_REQUEST_READ_DATA {
24082    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24083    pub param_index: i16,
24084    #[doc = "System ID"]
24085    pub target_system: u8,
24086    #[doc = "Component ID"]
24087    pub target_component: u8,
24088    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24089    #[cfg_attr(feature = "ts", ts(type = "string"))]
24090    pub param_id: CharArray<16>,
24091}
24092impl PARAM_EXT_REQUEST_READ_DATA {
24093    pub const ENCODED_LEN: usize = 20usize;
24094    pub const DEFAULT: Self = Self {
24095        param_index: 0_i16,
24096        target_system: 0_u8,
24097        target_component: 0_u8,
24098        param_id: CharArray::new([0_u8; 16usize]),
24099    };
24100    #[cfg(feature = "arbitrary")]
24101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24102        use arbitrary::{Arbitrary, Unstructured};
24103        let mut buf = [0u8; 1024];
24104        rng.fill_bytes(&mut buf);
24105        let mut unstructured = Unstructured::new(&buf);
24106        Self::arbitrary(&mut unstructured).unwrap_or_default()
24107    }
24108}
24109impl Default for PARAM_EXT_REQUEST_READ_DATA {
24110    fn default() -> Self {
24111        Self::DEFAULT.clone()
24112    }
24113}
24114impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24115    type Message = MavMessage;
24116    const ID: u32 = 320u32;
24117    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24118    const EXTRA_CRC: u8 = 243u8;
24119    const ENCODED_LEN: usize = 20usize;
24120    fn deser(
24121        _version: MavlinkVersion,
24122        __input: &[u8],
24123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24124        let avail_len = __input.len();
24125        let mut payload_buf = [0; Self::ENCODED_LEN];
24126        let mut buf = if avail_len < Self::ENCODED_LEN {
24127            payload_buf[0..avail_len].copy_from_slice(__input);
24128            Bytes::new(&payload_buf)
24129        } else {
24130            Bytes::new(__input)
24131        };
24132        let mut __struct = Self::default();
24133        __struct.param_index = buf.get_i16_le();
24134        __struct.target_system = buf.get_u8();
24135        __struct.target_component = buf.get_u8();
24136        let mut tmp = [0_u8; 16usize];
24137        for v in &mut tmp {
24138            *v = buf.get_u8();
24139        }
24140        __struct.param_id = CharArray::new(tmp);
24141        Ok(__struct)
24142    }
24143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24144        let mut __tmp = BytesMut::new(bytes);
24145        #[allow(clippy::absurd_extreme_comparisons)]
24146        #[allow(unused_comparisons)]
24147        if __tmp.remaining() < Self::ENCODED_LEN {
24148            panic!(
24149                "buffer is too small (need {} bytes, but got {})",
24150                Self::ENCODED_LEN,
24151                __tmp.remaining(),
24152            )
24153        }
24154        __tmp.put_i16_le(self.param_index);
24155        __tmp.put_u8(self.target_system);
24156        __tmp.put_u8(self.target_component);
24157        for val in &self.param_id {
24158            __tmp.put_u8(*val);
24159        }
24160        if matches!(version, MavlinkVersion::V2) {
24161            let len = __tmp.len();
24162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24163        } else {
24164            __tmp.len()
24165        }
24166    }
24167}
24168#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24169#[doc = ""]
24170#[doc = "ID: 323"]
24171#[derive(Debug, Clone, PartialEq)]
24172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24174#[cfg_attr(feature = "ts", derive(TS))]
24175#[cfg_attr(feature = "ts", ts(export))]
24176pub struct PARAM_EXT_SET_DATA {
24177    #[doc = "System ID"]
24178    pub target_system: u8,
24179    #[doc = "Component ID"]
24180    pub target_component: u8,
24181    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24182    #[cfg_attr(feature = "ts", ts(type = "string"))]
24183    pub param_id: CharArray<16>,
24184    #[doc = "Parameter value"]
24185    #[cfg_attr(feature = "ts", ts(type = "string"))]
24186    pub param_value: CharArray<128>,
24187    #[doc = "Parameter type."]
24188    pub param_type: MavParamExtType,
24189}
24190impl PARAM_EXT_SET_DATA {
24191    pub const ENCODED_LEN: usize = 147usize;
24192    pub const DEFAULT: Self = Self {
24193        target_system: 0_u8,
24194        target_component: 0_u8,
24195        param_id: CharArray::new([0_u8; 16usize]),
24196        param_value: CharArray::new([0_u8; 128usize]),
24197        param_type: MavParamExtType::DEFAULT,
24198    };
24199    #[cfg(feature = "arbitrary")]
24200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24201        use arbitrary::{Arbitrary, Unstructured};
24202        let mut buf = [0u8; 1024];
24203        rng.fill_bytes(&mut buf);
24204        let mut unstructured = Unstructured::new(&buf);
24205        Self::arbitrary(&mut unstructured).unwrap_or_default()
24206    }
24207}
24208impl Default for PARAM_EXT_SET_DATA {
24209    fn default() -> Self {
24210        Self::DEFAULT.clone()
24211    }
24212}
24213impl MessageData for PARAM_EXT_SET_DATA {
24214    type Message = MavMessage;
24215    const ID: u32 = 323u32;
24216    const NAME: &'static str = "PARAM_EXT_SET";
24217    const EXTRA_CRC: u8 = 78u8;
24218    const ENCODED_LEN: usize = 147usize;
24219    fn deser(
24220        _version: MavlinkVersion,
24221        __input: &[u8],
24222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24223        let avail_len = __input.len();
24224        let mut payload_buf = [0; Self::ENCODED_LEN];
24225        let mut buf = if avail_len < Self::ENCODED_LEN {
24226            payload_buf[0..avail_len].copy_from_slice(__input);
24227            Bytes::new(&payload_buf)
24228        } else {
24229            Bytes::new(__input)
24230        };
24231        let mut __struct = Self::default();
24232        __struct.target_system = buf.get_u8();
24233        __struct.target_component = buf.get_u8();
24234        let mut tmp = [0_u8; 16usize];
24235        for v in &mut tmp {
24236            *v = buf.get_u8();
24237        }
24238        __struct.param_id = CharArray::new(tmp);
24239        let mut tmp = [0_u8; 128usize];
24240        for v in &mut tmp {
24241            *v = buf.get_u8();
24242        }
24243        __struct.param_value = CharArray::new(tmp);
24244        let tmp = buf.get_u8();
24245        __struct.param_type =
24246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24247                enum_type: "MavParamExtType",
24248                value: tmp as u64,
24249            })?;
24250        Ok(__struct)
24251    }
24252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24253        let mut __tmp = BytesMut::new(bytes);
24254        #[allow(clippy::absurd_extreme_comparisons)]
24255        #[allow(unused_comparisons)]
24256        if __tmp.remaining() < Self::ENCODED_LEN {
24257            panic!(
24258                "buffer is too small (need {} bytes, but got {})",
24259                Self::ENCODED_LEN,
24260                __tmp.remaining(),
24261            )
24262        }
24263        __tmp.put_u8(self.target_system);
24264        __tmp.put_u8(self.target_component);
24265        for val in &self.param_id {
24266            __tmp.put_u8(*val);
24267        }
24268        for val in &self.param_value {
24269            __tmp.put_u8(*val);
24270        }
24271        __tmp.put_u8(self.param_type as u8);
24272        if matches!(version, MavlinkVersion::V2) {
24273            let len = __tmp.len();
24274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24275        } else {
24276            __tmp.len()
24277        }
24278    }
24279}
24280#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24281#[doc = ""]
24282#[doc = "ID: 322"]
24283#[derive(Debug, Clone, PartialEq)]
24284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24286#[cfg_attr(feature = "ts", derive(TS))]
24287#[cfg_attr(feature = "ts", ts(export))]
24288pub struct PARAM_EXT_VALUE_DATA {
24289    #[doc = "Total number of parameters"]
24290    pub param_count: u16,
24291    #[doc = "Index of this parameter"]
24292    pub param_index: u16,
24293    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24294    #[cfg_attr(feature = "ts", ts(type = "string"))]
24295    pub param_id: CharArray<16>,
24296    #[doc = "Parameter value"]
24297    #[cfg_attr(feature = "ts", ts(type = "string"))]
24298    pub param_value: CharArray<128>,
24299    #[doc = "Parameter type."]
24300    pub param_type: MavParamExtType,
24301}
24302impl PARAM_EXT_VALUE_DATA {
24303    pub const ENCODED_LEN: usize = 149usize;
24304    pub const DEFAULT: Self = Self {
24305        param_count: 0_u16,
24306        param_index: 0_u16,
24307        param_id: CharArray::new([0_u8; 16usize]),
24308        param_value: CharArray::new([0_u8; 128usize]),
24309        param_type: MavParamExtType::DEFAULT,
24310    };
24311    #[cfg(feature = "arbitrary")]
24312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24313        use arbitrary::{Arbitrary, Unstructured};
24314        let mut buf = [0u8; 1024];
24315        rng.fill_bytes(&mut buf);
24316        let mut unstructured = Unstructured::new(&buf);
24317        Self::arbitrary(&mut unstructured).unwrap_or_default()
24318    }
24319}
24320impl Default for PARAM_EXT_VALUE_DATA {
24321    fn default() -> Self {
24322        Self::DEFAULT.clone()
24323    }
24324}
24325impl MessageData for PARAM_EXT_VALUE_DATA {
24326    type Message = MavMessage;
24327    const ID: u32 = 322u32;
24328    const NAME: &'static str = "PARAM_EXT_VALUE";
24329    const EXTRA_CRC: u8 = 243u8;
24330    const ENCODED_LEN: usize = 149usize;
24331    fn deser(
24332        _version: MavlinkVersion,
24333        __input: &[u8],
24334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24335        let avail_len = __input.len();
24336        let mut payload_buf = [0; Self::ENCODED_LEN];
24337        let mut buf = if avail_len < Self::ENCODED_LEN {
24338            payload_buf[0..avail_len].copy_from_slice(__input);
24339            Bytes::new(&payload_buf)
24340        } else {
24341            Bytes::new(__input)
24342        };
24343        let mut __struct = Self::default();
24344        __struct.param_count = buf.get_u16_le();
24345        __struct.param_index = buf.get_u16_le();
24346        let mut tmp = [0_u8; 16usize];
24347        for v in &mut tmp {
24348            *v = buf.get_u8();
24349        }
24350        __struct.param_id = CharArray::new(tmp);
24351        let mut tmp = [0_u8; 128usize];
24352        for v in &mut tmp {
24353            *v = buf.get_u8();
24354        }
24355        __struct.param_value = CharArray::new(tmp);
24356        let tmp = buf.get_u8();
24357        __struct.param_type =
24358            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24359                enum_type: "MavParamExtType",
24360                value: tmp as u64,
24361            })?;
24362        Ok(__struct)
24363    }
24364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24365        let mut __tmp = BytesMut::new(bytes);
24366        #[allow(clippy::absurd_extreme_comparisons)]
24367        #[allow(unused_comparisons)]
24368        if __tmp.remaining() < Self::ENCODED_LEN {
24369            panic!(
24370                "buffer is too small (need {} bytes, but got {})",
24371                Self::ENCODED_LEN,
24372                __tmp.remaining(),
24373            )
24374        }
24375        __tmp.put_u16_le(self.param_count);
24376        __tmp.put_u16_le(self.param_index);
24377        for val in &self.param_id {
24378            __tmp.put_u8(*val);
24379        }
24380        for val in &self.param_value {
24381            __tmp.put_u8(*val);
24382        }
24383        __tmp.put_u8(self.param_type as u8);
24384        if matches!(version, MavlinkVersion::V2) {
24385            let len = __tmp.len();
24386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24387        } else {
24388            __tmp.len()
24389        }
24390    }
24391}
24392#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24393#[doc = ""]
24394#[doc = "ID: 50"]
24395#[derive(Debug, Clone, PartialEq)]
24396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24398#[cfg_attr(feature = "ts", derive(TS))]
24399#[cfg_attr(feature = "ts", ts(export))]
24400pub struct PARAM_MAP_RC_DATA {
24401    #[doc = "Initial parameter value"]
24402    pub param_value0: f32,
24403    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24404    pub scale: f32,
24405    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24406    pub param_value_min: f32,
24407    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24408    pub param_value_max: f32,
24409    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24410    pub param_index: i16,
24411    #[doc = "System ID"]
24412    pub target_system: u8,
24413    #[doc = "Component ID"]
24414    pub target_component: u8,
24415    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24416    #[cfg_attr(feature = "ts", ts(type = "string"))]
24417    pub param_id: CharArray<16>,
24418    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24419    pub parameter_rc_channel_index: u8,
24420}
24421impl PARAM_MAP_RC_DATA {
24422    pub const ENCODED_LEN: usize = 37usize;
24423    pub const DEFAULT: Self = Self {
24424        param_value0: 0.0_f32,
24425        scale: 0.0_f32,
24426        param_value_min: 0.0_f32,
24427        param_value_max: 0.0_f32,
24428        param_index: 0_i16,
24429        target_system: 0_u8,
24430        target_component: 0_u8,
24431        param_id: CharArray::new([0_u8; 16usize]),
24432        parameter_rc_channel_index: 0_u8,
24433    };
24434    #[cfg(feature = "arbitrary")]
24435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24436        use arbitrary::{Arbitrary, Unstructured};
24437        let mut buf = [0u8; 1024];
24438        rng.fill_bytes(&mut buf);
24439        let mut unstructured = Unstructured::new(&buf);
24440        Self::arbitrary(&mut unstructured).unwrap_or_default()
24441    }
24442}
24443impl Default for PARAM_MAP_RC_DATA {
24444    fn default() -> Self {
24445        Self::DEFAULT.clone()
24446    }
24447}
24448impl MessageData for PARAM_MAP_RC_DATA {
24449    type Message = MavMessage;
24450    const ID: u32 = 50u32;
24451    const NAME: &'static str = "PARAM_MAP_RC";
24452    const EXTRA_CRC: u8 = 78u8;
24453    const ENCODED_LEN: usize = 37usize;
24454    fn deser(
24455        _version: MavlinkVersion,
24456        __input: &[u8],
24457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24458        let avail_len = __input.len();
24459        let mut payload_buf = [0; Self::ENCODED_LEN];
24460        let mut buf = if avail_len < Self::ENCODED_LEN {
24461            payload_buf[0..avail_len].copy_from_slice(__input);
24462            Bytes::new(&payload_buf)
24463        } else {
24464            Bytes::new(__input)
24465        };
24466        let mut __struct = Self::default();
24467        __struct.param_value0 = buf.get_f32_le();
24468        __struct.scale = buf.get_f32_le();
24469        __struct.param_value_min = buf.get_f32_le();
24470        __struct.param_value_max = buf.get_f32_le();
24471        __struct.param_index = buf.get_i16_le();
24472        __struct.target_system = buf.get_u8();
24473        __struct.target_component = buf.get_u8();
24474        let mut tmp = [0_u8; 16usize];
24475        for v in &mut tmp {
24476            *v = buf.get_u8();
24477        }
24478        __struct.param_id = CharArray::new(tmp);
24479        __struct.parameter_rc_channel_index = buf.get_u8();
24480        Ok(__struct)
24481    }
24482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24483        let mut __tmp = BytesMut::new(bytes);
24484        #[allow(clippy::absurd_extreme_comparisons)]
24485        #[allow(unused_comparisons)]
24486        if __tmp.remaining() < Self::ENCODED_LEN {
24487            panic!(
24488                "buffer is too small (need {} bytes, but got {})",
24489                Self::ENCODED_LEN,
24490                __tmp.remaining(),
24491            )
24492        }
24493        __tmp.put_f32_le(self.param_value0);
24494        __tmp.put_f32_le(self.scale);
24495        __tmp.put_f32_le(self.param_value_min);
24496        __tmp.put_f32_le(self.param_value_max);
24497        __tmp.put_i16_le(self.param_index);
24498        __tmp.put_u8(self.target_system);
24499        __tmp.put_u8(self.target_component);
24500        for val in &self.param_id {
24501            __tmp.put_u8(*val);
24502        }
24503        __tmp.put_u8(self.parameter_rc_channel_index);
24504        if matches!(version, MavlinkVersion::V2) {
24505            let len = __tmp.len();
24506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24507        } else {
24508            __tmp.len()
24509        }
24510    }
24511}
24512#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24513#[doc = ""]
24514#[doc = "ID: 21"]
24515#[derive(Debug, Clone, PartialEq)]
24516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24518#[cfg_attr(feature = "ts", derive(TS))]
24519#[cfg_attr(feature = "ts", ts(export))]
24520pub struct PARAM_REQUEST_LIST_DATA {
24521    #[doc = "System ID"]
24522    pub target_system: u8,
24523    #[doc = "Component ID"]
24524    pub target_component: u8,
24525}
24526impl PARAM_REQUEST_LIST_DATA {
24527    pub const ENCODED_LEN: usize = 2usize;
24528    pub const DEFAULT: Self = Self {
24529        target_system: 0_u8,
24530        target_component: 0_u8,
24531    };
24532    #[cfg(feature = "arbitrary")]
24533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24534        use arbitrary::{Arbitrary, Unstructured};
24535        let mut buf = [0u8; 1024];
24536        rng.fill_bytes(&mut buf);
24537        let mut unstructured = Unstructured::new(&buf);
24538        Self::arbitrary(&mut unstructured).unwrap_or_default()
24539    }
24540}
24541impl Default for PARAM_REQUEST_LIST_DATA {
24542    fn default() -> Self {
24543        Self::DEFAULT.clone()
24544    }
24545}
24546impl MessageData for PARAM_REQUEST_LIST_DATA {
24547    type Message = MavMessage;
24548    const ID: u32 = 21u32;
24549    const NAME: &'static str = "PARAM_REQUEST_LIST";
24550    const EXTRA_CRC: u8 = 159u8;
24551    const ENCODED_LEN: usize = 2usize;
24552    fn deser(
24553        _version: MavlinkVersion,
24554        __input: &[u8],
24555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24556        let avail_len = __input.len();
24557        let mut payload_buf = [0; Self::ENCODED_LEN];
24558        let mut buf = if avail_len < Self::ENCODED_LEN {
24559            payload_buf[0..avail_len].copy_from_slice(__input);
24560            Bytes::new(&payload_buf)
24561        } else {
24562            Bytes::new(__input)
24563        };
24564        let mut __struct = Self::default();
24565        __struct.target_system = buf.get_u8();
24566        __struct.target_component = buf.get_u8();
24567        Ok(__struct)
24568    }
24569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24570        let mut __tmp = BytesMut::new(bytes);
24571        #[allow(clippy::absurd_extreme_comparisons)]
24572        #[allow(unused_comparisons)]
24573        if __tmp.remaining() < Self::ENCODED_LEN {
24574            panic!(
24575                "buffer is too small (need {} bytes, but got {})",
24576                Self::ENCODED_LEN,
24577                __tmp.remaining(),
24578            )
24579        }
24580        __tmp.put_u8(self.target_system);
24581        __tmp.put_u8(self.target_component);
24582        if matches!(version, MavlinkVersion::V2) {
24583            let len = __tmp.len();
24584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24585        } else {
24586            __tmp.len()
24587        }
24588    }
24589}
24590#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24591#[doc = ""]
24592#[doc = "ID: 20"]
24593#[derive(Debug, Clone, PartialEq)]
24594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24596#[cfg_attr(feature = "ts", derive(TS))]
24597#[cfg_attr(feature = "ts", ts(export))]
24598pub struct PARAM_REQUEST_READ_DATA {
24599    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24600    pub param_index: i16,
24601    #[doc = "System ID"]
24602    pub target_system: u8,
24603    #[doc = "Component ID"]
24604    pub target_component: u8,
24605    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24606    #[cfg_attr(feature = "ts", ts(type = "string"))]
24607    pub param_id: CharArray<16>,
24608}
24609impl PARAM_REQUEST_READ_DATA {
24610    pub const ENCODED_LEN: usize = 20usize;
24611    pub const DEFAULT: Self = Self {
24612        param_index: 0_i16,
24613        target_system: 0_u8,
24614        target_component: 0_u8,
24615        param_id: CharArray::new([0_u8; 16usize]),
24616    };
24617    #[cfg(feature = "arbitrary")]
24618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24619        use arbitrary::{Arbitrary, Unstructured};
24620        let mut buf = [0u8; 1024];
24621        rng.fill_bytes(&mut buf);
24622        let mut unstructured = Unstructured::new(&buf);
24623        Self::arbitrary(&mut unstructured).unwrap_or_default()
24624    }
24625}
24626impl Default for PARAM_REQUEST_READ_DATA {
24627    fn default() -> Self {
24628        Self::DEFAULT.clone()
24629    }
24630}
24631impl MessageData for PARAM_REQUEST_READ_DATA {
24632    type Message = MavMessage;
24633    const ID: u32 = 20u32;
24634    const NAME: &'static str = "PARAM_REQUEST_READ";
24635    const EXTRA_CRC: u8 = 214u8;
24636    const ENCODED_LEN: usize = 20usize;
24637    fn deser(
24638        _version: MavlinkVersion,
24639        __input: &[u8],
24640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24641        let avail_len = __input.len();
24642        let mut payload_buf = [0; Self::ENCODED_LEN];
24643        let mut buf = if avail_len < Self::ENCODED_LEN {
24644            payload_buf[0..avail_len].copy_from_slice(__input);
24645            Bytes::new(&payload_buf)
24646        } else {
24647            Bytes::new(__input)
24648        };
24649        let mut __struct = Self::default();
24650        __struct.param_index = buf.get_i16_le();
24651        __struct.target_system = buf.get_u8();
24652        __struct.target_component = buf.get_u8();
24653        let mut tmp = [0_u8; 16usize];
24654        for v in &mut tmp {
24655            *v = buf.get_u8();
24656        }
24657        __struct.param_id = CharArray::new(tmp);
24658        Ok(__struct)
24659    }
24660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24661        let mut __tmp = BytesMut::new(bytes);
24662        #[allow(clippy::absurd_extreme_comparisons)]
24663        #[allow(unused_comparisons)]
24664        if __tmp.remaining() < Self::ENCODED_LEN {
24665            panic!(
24666                "buffer is too small (need {} bytes, but got {})",
24667                Self::ENCODED_LEN,
24668                __tmp.remaining(),
24669            )
24670        }
24671        __tmp.put_i16_le(self.param_index);
24672        __tmp.put_u8(self.target_system);
24673        __tmp.put_u8(self.target_component);
24674        for val in &self.param_id {
24675            __tmp.put_u8(*val);
24676        }
24677        if matches!(version, MavlinkVersion::V2) {
24678            let len = __tmp.len();
24679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24680        } else {
24681            __tmp.len()
24682        }
24683    }
24684}
24685#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24686#[doc = ""]
24687#[doc = "ID: 23"]
24688#[derive(Debug, Clone, PartialEq)]
24689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24691#[cfg_attr(feature = "ts", derive(TS))]
24692#[cfg_attr(feature = "ts", ts(export))]
24693pub struct PARAM_SET_DATA {
24694    #[doc = "Onboard parameter value"]
24695    pub param_value: f32,
24696    #[doc = "System ID"]
24697    pub target_system: u8,
24698    #[doc = "Component ID"]
24699    pub target_component: u8,
24700    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24701    #[cfg_attr(feature = "ts", ts(type = "string"))]
24702    pub param_id: CharArray<16>,
24703    #[doc = "Onboard parameter type."]
24704    pub param_type: MavParamType,
24705}
24706impl PARAM_SET_DATA {
24707    pub const ENCODED_LEN: usize = 23usize;
24708    pub const DEFAULT: Self = Self {
24709        param_value: 0.0_f32,
24710        target_system: 0_u8,
24711        target_component: 0_u8,
24712        param_id: CharArray::new([0_u8; 16usize]),
24713        param_type: MavParamType::DEFAULT,
24714    };
24715    #[cfg(feature = "arbitrary")]
24716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24717        use arbitrary::{Arbitrary, Unstructured};
24718        let mut buf = [0u8; 1024];
24719        rng.fill_bytes(&mut buf);
24720        let mut unstructured = Unstructured::new(&buf);
24721        Self::arbitrary(&mut unstructured).unwrap_or_default()
24722    }
24723}
24724impl Default for PARAM_SET_DATA {
24725    fn default() -> Self {
24726        Self::DEFAULT.clone()
24727    }
24728}
24729impl MessageData for PARAM_SET_DATA {
24730    type Message = MavMessage;
24731    const ID: u32 = 23u32;
24732    const NAME: &'static str = "PARAM_SET";
24733    const EXTRA_CRC: u8 = 168u8;
24734    const ENCODED_LEN: usize = 23usize;
24735    fn deser(
24736        _version: MavlinkVersion,
24737        __input: &[u8],
24738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24739        let avail_len = __input.len();
24740        let mut payload_buf = [0; Self::ENCODED_LEN];
24741        let mut buf = if avail_len < Self::ENCODED_LEN {
24742            payload_buf[0..avail_len].copy_from_slice(__input);
24743            Bytes::new(&payload_buf)
24744        } else {
24745            Bytes::new(__input)
24746        };
24747        let mut __struct = Self::default();
24748        __struct.param_value = buf.get_f32_le();
24749        __struct.target_system = buf.get_u8();
24750        __struct.target_component = buf.get_u8();
24751        let mut tmp = [0_u8; 16usize];
24752        for v in &mut tmp {
24753            *v = buf.get_u8();
24754        }
24755        __struct.param_id = CharArray::new(tmp);
24756        let tmp = buf.get_u8();
24757        __struct.param_type =
24758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24759                enum_type: "MavParamType",
24760                value: tmp as u64,
24761            })?;
24762        Ok(__struct)
24763    }
24764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24765        let mut __tmp = BytesMut::new(bytes);
24766        #[allow(clippy::absurd_extreme_comparisons)]
24767        #[allow(unused_comparisons)]
24768        if __tmp.remaining() < Self::ENCODED_LEN {
24769            panic!(
24770                "buffer is too small (need {} bytes, but got {})",
24771                Self::ENCODED_LEN,
24772                __tmp.remaining(),
24773            )
24774        }
24775        __tmp.put_f32_le(self.param_value);
24776        __tmp.put_u8(self.target_system);
24777        __tmp.put_u8(self.target_component);
24778        for val in &self.param_id {
24779            __tmp.put_u8(*val);
24780        }
24781        __tmp.put_u8(self.param_type as u8);
24782        if matches!(version, MavlinkVersion::V2) {
24783            let len = __tmp.len();
24784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24785        } else {
24786            __tmp.len()
24787        }
24788    }
24789}
24790#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24791#[doc = ""]
24792#[doc = "ID: 22"]
24793#[derive(Debug, Clone, PartialEq)]
24794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24796#[cfg_attr(feature = "ts", derive(TS))]
24797#[cfg_attr(feature = "ts", ts(export))]
24798pub struct PARAM_VALUE_DATA {
24799    #[doc = "Onboard parameter value"]
24800    pub param_value: f32,
24801    #[doc = "Total number of onboard parameters"]
24802    pub param_count: u16,
24803    #[doc = "Index of this onboard parameter"]
24804    pub param_index: u16,
24805    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24806    #[cfg_attr(feature = "ts", ts(type = "string"))]
24807    pub param_id: CharArray<16>,
24808    #[doc = "Onboard parameter type."]
24809    pub param_type: MavParamType,
24810}
24811impl PARAM_VALUE_DATA {
24812    pub const ENCODED_LEN: usize = 25usize;
24813    pub const DEFAULT: Self = Self {
24814        param_value: 0.0_f32,
24815        param_count: 0_u16,
24816        param_index: 0_u16,
24817        param_id: CharArray::new([0_u8; 16usize]),
24818        param_type: MavParamType::DEFAULT,
24819    };
24820    #[cfg(feature = "arbitrary")]
24821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24822        use arbitrary::{Arbitrary, Unstructured};
24823        let mut buf = [0u8; 1024];
24824        rng.fill_bytes(&mut buf);
24825        let mut unstructured = Unstructured::new(&buf);
24826        Self::arbitrary(&mut unstructured).unwrap_or_default()
24827    }
24828}
24829impl Default for PARAM_VALUE_DATA {
24830    fn default() -> Self {
24831        Self::DEFAULT.clone()
24832    }
24833}
24834impl MessageData for PARAM_VALUE_DATA {
24835    type Message = MavMessage;
24836    const ID: u32 = 22u32;
24837    const NAME: &'static str = "PARAM_VALUE";
24838    const EXTRA_CRC: u8 = 220u8;
24839    const ENCODED_LEN: usize = 25usize;
24840    fn deser(
24841        _version: MavlinkVersion,
24842        __input: &[u8],
24843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24844        let avail_len = __input.len();
24845        let mut payload_buf = [0; Self::ENCODED_LEN];
24846        let mut buf = if avail_len < Self::ENCODED_LEN {
24847            payload_buf[0..avail_len].copy_from_slice(__input);
24848            Bytes::new(&payload_buf)
24849        } else {
24850            Bytes::new(__input)
24851        };
24852        let mut __struct = Self::default();
24853        __struct.param_value = buf.get_f32_le();
24854        __struct.param_count = buf.get_u16_le();
24855        __struct.param_index = buf.get_u16_le();
24856        let mut tmp = [0_u8; 16usize];
24857        for v in &mut tmp {
24858            *v = buf.get_u8();
24859        }
24860        __struct.param_id = CharArray::new(tmp);
24861        let tmp = buf.get_u8();
24862        __struct.param_type =
24863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24864                enum_type: "MavParamType",
24865                value: tmp as u64,
24866            })?;
24867        Ok(__struct)
24868    }
24869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24870        let mut __tmp = BytesMut::new(bytes);
24871        #[allow(clippy::absurd_extreme_comparisons)]
24872        #[allow(unused_comparisons)]
24873        if __tmp.remaining() < Self::ENCODED_LEN {
24874            panic!(
24875                "buffer is too small (need {} bytes, but got {})",
24876                Self::ENCODED_LEN,
24877                __tmp.remaining(),
24878            )
24879        }
24880        __tmp.put_f32_le(self.param_value);
24881        __tmp.put_u16_le(self.param_count);
24882        __tmp.put_u16_le(self.param_index);
24883        for val in &self.param_id {
24884            __tmp.put_u8(*val);
24885        }
24886        __tmp.put_u8(self.param_type as u8);
24887        if matches!(version, MavlinkVersion::V2) {
24888            let len = __tmp.len();
24889            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24890        } else {
24891            __tmp.len()
24892        }
24893    }
24894}
24895#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24896#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24897#[doc = ""]
24898#[doc = "ID: 4"]
24899#[derive(Debug, Clone, PartialEq)]
24900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24902#[cfg_attr(feature = "ts", derive(TS))]
24903#[cfg_attr(feature = "ts", ts(export))]
24904pub struct PING_DATA {
24905    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24906    pub time_usec: u64,
24907    #[doc = "PING sequence"]
24908    pub seq: u32,
24909    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24910    pub target_system: u8,
24911    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24912    pub target_component: u8,
24913}
24914impl PING_DATA {
24915    pub const ENCODED_LEN: usize = 14usize;
24916    pub const DEFAULT: Self = Self {
24917        time_usec: 0_u64,
24918        seq: 0_u32,
24919        target_system: 0_u8,
24920        target_component: 0_u8,
24921    };
24922    #[cfg(feature = "arbitrary")]
24923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24924        use arbitrary::{Arbitrary, Unstructured};
24925        let mut buf = [0u8; 1024];
24926        rng.fill_bytes(&mut buf);
24927        let mut unstructured = Unstructured::new(&buf);
24928        Self::arbitrary(&mut unstructured).unwrap_or_default()
24929    }
24930}
24931impl Default for PING_DATA {
24932    fn default() -> Self {
24933        Self::DEFAULT.clone()
24934    }
24935}
24936impl MessageData for PING_DATA {
24937    type Message = MavMessage;
24938    const ID: u32 = 4u32;
24939    const NAME: &'static str = "PING";
24940    const EXTRA_CRC: u8 = 237u8;
24941    const ENCODED_LEN: usize = 14usize;
24942    fn deser(
24943        _version: MavlinkVersion,
24944        __input: &[u8],
24945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24946        let avail_len = __input.len();
24947        let mut payload_buf = [0; Self::ENCODED_LEN];
24948        let mut buf = if avail_len < Self::ENCODED_LEN {
24949            payload_buf[0..avail_len].copy_from_slice(__input);
24950            Bytes::new(&payload_buf)
24951        } else {
24952            Bytes::new(__input)
24953        };
24954        let mut __struct = Self::default();
24955        __struct.time_usec = buf.get_u64_le();
24956        __struct.seq = buf.get_u32_le();
24957        __struct.target_system = buf.get_u8();
24958        __struct.target_component = buf.get_u8();
24959        Ok(__struct)
24960    }
24961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24962        let mut __tmp = BytesMut::new(bytes);
24963        #[allow(clippy::absurd_extreme_comparisons)]
24964        #[allow(unused_comparisons)]
24965        if __tmp.remaining() < Self::ENCODED_LEN {
24966            panic!(
24967                "buffer is too small (need {} bytes, but got {})",
24968                Self::ENCODED_LEN,
24969                __tmp.remaining(),
24970            )
24971        }
24972        __tmp.put_u64_le(self.time_usec);
24973        __tmp.put_u32_le(self.seq);
24974        __tmp.put_u8(self.target_system);
24975        __tmp.put_u8(self.target_component);
24976        if matches!(version, MavlinkVersion::V2) {
24977            let len = __tmp.len();
24978            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24979        } else {
24980            __tmp.len()
24981        }
24982    }
24983}
24984#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24985#[doc = "Control vehicle tone generation (buzzer)."]
24986#[doc = ""]
24987#[doc = "ID: 258"]
24988#[derive(Debug, Clone, PartialEq)]
24989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24991#[cfg_attr(feature = "ts", derive(TS))]
24992#[cfg_attr(feature = "ts", ts(export))]
24993pub struct PLAY_TUNE_DATA {
24994    #[doc = "System ID"]
24995    pub target_system: u8,
24996    #[doc = "Component ID"]
24997    pub target_component: u8,
24998    #[doc = "tune in board specific format"]
24999    #[cfg_attr(feature = "ts", ts(type = "string"))]
25000    pub tune: CharArray<30>,
25001    #[doc = "tune extension (appended to tune)"]
25002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25003    #[cfg_attr(feature = "ts", ts(type = "string"))]
25004    pub tune2: CharArray<200>,
25005}
25006impl PLAY_TUNE_DATA {
25007    pub const ENCODED_LEN: usize = 232usize;
25008    pub const DEFAULT: Self = Self {
25009        target_system: 0_u8,
25010        target_component: 0_u8,
25011        tune: CharArray::new([0_u8; 30usize]),
25012        tune2: CharArray::new([0_u8; 200usize]),
25013    };
25014    #[cfg(feature = "arbitrary")]
25015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25016        use arbitrary::{Arbitrary, Unstructured};
25017        let mut buf = [0u8; 1024];
25018        rng.fill_bytes(&mut buf);
25019        let mut unstructured = Unstructured::new(&buf);
25020        Self::arbitrary(&mut unstructured).unwrap_or_default()
25021    }
25022}
25023impl Default for PLAY_TUNE_DATA {
25024    fn default() -> Self {
25025        Self::DEFAULT.clone()
25026    }
25027}
25028impl MessageData for PLAY_TUNE_DATA {
25029    type Message = MavMessage;
25030    const ID: u32 = 258u32;
25031    const NAME: &'static str = "PLAY_TUNE";
25032    const EXTRA_CRC: u8 = 187u8;
25033    const ENCODED_LEN: usize = 232usize;
25034    fn deser(
25035        _version: MavlinkVersion,
25036        __input: &[u8],
25037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25038        let avail_len = __input.len();
25039        let mut payload_buf = [0; Self::ENCODED_LEN];
25040        let mut buf = if avail_len < Self::ENCODED_LEN {
25041            payload_buf[0..avail_len].copy_from_slice(__input);
25042            Bytes::new(&payload_buf)
25043        } else {
25044            Bytes::new(__input)
25045        };
25046        let mut __struct = Self::default();
25047        __struct.target_system = buf.get_u8();
25048        __struct.target_component = buf.get_u8();
25049        let mut tmp = [0_u8; 30usize];
25050        for v in &mut tmp {
25051            *v = buf.get_u8();
25052        }
25053        __struct.tune = CharArray::new(tmp);
25054        let mut tmp = [0_u8; 200usize];
25055        for v in &mut tmp {
25056            *v = buf.get_u8();
25057        }
25058        __struct.tune2 = CharArray::new(tmp);
25059        Ok(__struct)
25060    }
25061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25062        let mut __tmp = BytesMut::new(bytes);
25063        #[allow(clippy::absurd_extreme_comparisons)]
25064        #[allow(unused_comparisons)]
25065        if __tmp.remaining() < Self::ENCODED_LEN {
25066            panic!(
25067                "buffer is too small (need {} bytes, but got {})",
25068                Self::ENCODED_LEN,
25069                __tmp.remaining(),
25070            )
25071        }
25072        __tmp.put_u8(self.target_system);
25073        __tmp.put_u8(self.target_component);
25074        for val in &self.tune {
25075            __tmp.put_u8(*val);
25076        }
25077        if matches!(version, MavlinkVersion::V2) {
25078            for val in &self.tune2 {
25079                __tmp.put_u8(*val);
25080            }
25081            let len = __tmp.len();
25082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25083        } else {
25084            __tmp.len()
25085        }
25086    }
25087}
25088#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25089#[doc = ""]
25090#[doc = "ID: 400"]
25091#[derive(Debug, Clone, PartialEq)]
25092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25094#[cfg_attr(feature = "ts", derive(TS))]
25095#[cfg_attr(feature = "ts", ts(export))]
25096pub struct PLAY_TUNE_V2_DATA {
25097    #[doc = "Tune format"]
25098    pub format: TuneFormat,
25099    #[doc = "System ID"]
25100    pub target_system: u8,
25101    #[doc = "Component ID"]
25102    pub target_component: u8,
25103    #[doc = "Tune definition as a NULL-terminated string."]
25104    #[cfg_attr(feature = "ts", ts(type = "string"))]
25105    pub tune: CharArray<248>,
25106}
25107impl PLAY_TUNE_V2_DATA {
25108    pub const ENCODED_LEN: usize = 254usize;
25109    pub const DEFAULT: Self = Self {
25110        format: TuneFormat::DEFAULT,
25111        target_system: 0_u8,
25112        target_component: 0_u8,
25113        tune: CharArray::new([0_u8; 248usize]),
25114    };
25115    #[cfg(feature = "arbitrary")]
25116    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25117        use arbitrary::{Arbitrary, Unstructured};
25118        let mut buf = [0u8; 1024];
25119        rng.fill_bytes(&mut buf);
25120        let mut unstructured = Unstructured::new(&buf);
25121        Self::arbitrary(&mut unstructured).unwrap_or_default()
25122    }
25123}
25124impl Default for PLAY_TUNE_V2_DATA {
25125    fn default() -> Self {
25126        Self::DEFAULT.clone()
25127    }
25128}
25129impl MessageData for PLAY_TUNE_V2_DATA {
25130    type Message = MavMessage;
25131    const ID: u32 = 400u32;
25132    const NAME: &'static str = "PLAY_TUNE_V2";
25133    const EXTRA_CRC: u8 = 110u8;
25134    const ENCODED_LEN: usize = 254usize;
25135    fn deser(
25136        _version: MavlinkVersion,
25137        __input: &[u8],
25138    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25139        let avail_len = __input.len();
25140        let mut payload_buf = [0; Self::ENCODED_LEN];
25141        let mut buf = if avail_len < Self::ENCODED_LEN {
25142            payload_buf[0..avail_len].copy_from_slice(__input);
25143            Bytes::new(&payload_buf)
25144        } else {
25145            Bytes::new(__input)
25146        };
25147        let mut __struct = Self::default();
25148        let tmp = buf.get_u32_le();
25149        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25150            ::mavlink_core::error::ParserError::InvalidEnum {
25151                enum_type: "TuneFormat",
25152                value: tmp as u64,
25153            },
25154        )?;
25155        __struct.target_system = buf.get_u8();
25156        __struct.target_component = buf.get_u8();
25157        let mut tmp = [0_u8; 248usize];
25158        for v in &mut tmp {
25159            *v = buf.get_u8();
25160        }
25161        __struct.tune = CharArray::new(tmp);
25162        Ok(__struct)
25163    }
25164    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25165        let mut __tmp = BytesMut::new(bytes);
25166        #[allow(clippy::absurd_extreme_comparisons)]
25167        #[allow(unused_comparisons)]
25168        if __tmp.remaining() < Self::ENCODED_LEN {
25169            panic!(
25170                "buffer is too small (need {} bytes, but got {})",
25171                Self::ENCODED_LEN,
25172                __tmp.remaining(),
25173            )
25174        }
25175        __tmp.put_u32_le(self.format as u32);
25176        __tmp.put_u8(self.target_system);
25177        __tmp.put_u8(self.target_component);
25178        for val in &self.tune {
25179            __tmp.put_u8(*val);
25180        }
25181        if matches!(version, MavlinkVersion::V2) {
25182            let len = __tmp.len();
25183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25184        } else {
25185            __tmp.len()
25186        }
25187    }
25188}
25189#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25190#[doc = ""]
25191#[doc = "ID: 87"]
25192#[derive(Debug, Clone, PartialEq)]
25193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25195#[cfg_attr(feature = "ts", derive(TS))]
25196#[cfg_attr(feature = "ts", ts(export))]
25197pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25198    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25199    pub time_boot_ms: u32,
25200    #[doc = "Latitude in WGS84 frame"]
25201    pub lat_int: i32,
25202    #[doc = "Longitude in WGS84 frame"]
25203    pub lon_int: i32,
25204    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25205    pub alt: f32,
25206    #[doc = "X velocity in NED frame"]
25207    pub vx: f32,
25208    #[doc = "Y velocity in NED frame"]
25209    pub vy: f32,
25210    #[doc = "Z velocity in NED frame"]
25211    pub vz: f32,
25212    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25213    pub afx: f32,
25214    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25215    pub afy: f32,
25216    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25217    pub afz: f32,
25218    #[doc = "yaw setpoint"]
25219    pub yaw: f32,
25220    #[doc = "yaw rate setpoint"]
25221    pub yaw_rate: f32,
25222    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25223    pub type_mask: PositionTargetTypemask,
25224    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25225    pub coordinate_frame: MavFrame,
25226}
25227impl POSITION_TARGET_GLOBAL_INT_DATA {
25228    pub const ENCODED_LEN: usize = 51usize;
25229    pub const DEFAULT: Self = Self {
25230        time_boot_ms: 0_u32,
25231        lat_int: 0_i32,
25232        lon_int: 0_i32,
25233        alt: 0.0_f32,
25234        vx: 0.0_f32,
25235        vy: 0.0_f32,
25236        vz: 0.0_f32,
25237        afx: 0.0_f32,
25238        afy: 0.0_f32,
25239        afz: 0.0_f32,
25240        yaw: 0.0_f32,
25241        yaw_rate: 0.0_f32,
25242        type_mask: PositionTargetTypemask::DEFAULT,
25243        coordinate_frame: MavFrame::DEFAULT,
25244    };
25245    #[cfg(feature = "arbitrary")]
25246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25247        use arbitrary::{Arbitrary, Unstructured};
25248        let mut buf = [0u8; 1024];
25249        rng.fill_bytes(&mut buf);
25250        let mut unstructured = Unstructured::new(&buf);
25251        Self::arbitrary(&mut unstructured).unwrap_or_default()
25252    }
25253}
25254impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25255    fn default() -> Self {
25256        Self::DEFAULT.clone()
25257    }
25258}
25259impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25260    type Message = MavMessage;
25261    const ID: u32 = 87u32;
25262    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25263    const EXTRA_CRC: u8 = 150u8;
25264    const ENCODED_LEN: usize = 51usize;
25265    fn deser(
25266        _version: MavlinkVersion,
25267        __input: &[u8],
25268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25269        let avail_len = __input.len();
25270        let mut payload_buf = [0; Self::ENCODED_LEN];
25271        let mut buf = if avail_len < Self::ENCODED_LEN {
25272            payload_buf[0..avail_len].copy_from_slice(__input);
25273            Bytes::new(&payload_buf)
25274        } else {
25275            Bytes::new(__input)
25276        };
25277        let mut __struct = Self::default();
25278        __struct.time_boot_ms = buf.get_u32_le();
25279        __struct.lat_int = buf.get_i32_le();
25280        __struct.lon_int = buf.get_i32_le();
25281        __struct.alt = buf.get_f32_le();
25282        __struct.vx = buf.get_f32_le();
25283        __struct.vy = buf.get_f32_le();
25284        __struct.vz = buf.get_f32_le();
25285        __struct.afx = buf.get_f32_le();
25286        __struct.afy = buf.get_f32_le();
25287        __struct.afz = buf.get_f32_le();
25288        __struct.yaw = buf.get_f32_le();
25289        __struct.yaw_rate = buf.get_f32_le();
25290        let tmp = buf.get_u16_le();
25291        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25292            ::mavlink_core::error::ParserError::InvalidFlag {
25293                flag_type: "PositionTargetTypemask",
25294                value: tmp as u64,
25295            },
25296        )?;
25297        let tmp = buf.get_u8();
25298        __struct.coordinate_frame =
25299            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25300                enum_type: "MavFrame",
25301                value: tmp as u64,
25302            })?;
25303        Ok(__struct)
25304    }
25305    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25306        let mut __tmp = BytesMut::new(bytes);
25307        #[allow(clippy::absurd_extreme_comparisons)]
25308        #[allow(unused_comparisons)]
25309        if __tmp.remaining() < Self::ENCODED_LEN {
25310            panic!(
25311                "buffer is too small (need {} bytes, but got {})",
25312                Self::ENCODED_LEN,
25313                __tmp.remaining(),
25314            )
25315        }
25316        __tmp.put_u32_le(self.time_boot_ms);
25317        __tmp.put_i32_le(self.lat_int);
25318        __tmp.put_i32_le(self.lon_int);
25319        __tmp.put_f32_le(self.alt);
25320        __tmp.put_f32_le(self.vx);
25321        __tmp.put_f32_le(self.vy);
25322        __tmp.put_f32_le(self.vz);
25323        __tmp.put_f32_le(self.afx);
25324        __tmp.put_f32_le(self.afy);
25325        __tmp.put_f32_le(self.afz);
25326        __tmp.put_f32_le(self.yaw);
25327        __tmp.put_f32_le(self.yaw_rate);
25328        __tmp.put_u16_le(self.type_mask.bits());
25329        __tmp.put_u8(self.coordinate_frame as u8);
25330        if matches!(version, MavlinkVersion::V2) {
25331            let len = __tmp.len();
25332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25333        } else {
25334            __tmp.len()
25335        }
25336    }
25337}
25338#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25339#[doc = ""]
25340#[doc = "ID: 85"]
25341#[derive(Debug, Clone, PartialEq)]
25342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25344#[cfg_attr(feature = "ts", derive(TS))]
25345#[cfg_attr(feature = "ts", ts(export))]
25346pub struct POSITION_TARGET_LOCAL_NED_DATA {
25347    #[doc = "Timestamp (time since system boot)."]
25348    pub time_boot_ms: u32,
25349    #[doc = "X Position in NED frame"]
25350    pub x: f32,
25351    #[doc = "Y Position in NED frame"]
25352    pub y: f32,
25353    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25354    pub z: f32,
25355    #[doc = "X velocity in NED frame"]
25356    pub vx: f32,
25357    #[doc = "Y velocity in NED frame"]
25358    pub vy: f32,
25359    #[doc = "Z velocity in NED frame"]
25360    pub vz: f32,
25361    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25362    pub afx: f32,
25363    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25364    pub afy: f32,
25365    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25366    pub afz: f32,
25367    #[doc = "yaw setpoint"]
25368    pub yaw: f32,
25369    #[doc = "yaw rate setpoint"]
25370    pub yaw_rate: f32,
25371    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25372    pub type_mask: PositionTargetTypemask,
25373    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25374    pub coordinate_frame: MavFrame,
25375}
25376impl POSITION_TARGET_LOCAL_NED_DATA {
25377    pub const ENCODED_LEN: usize = 51usize;
25378    pub const DEFAULT: Self = Self {
25379        time_boot_ms: 0_u32,
25380        x: 0.0_f32,
25381        y: 0.0_f32,
25382        z: 0.0_f32,
25383        vx: 0.0_f32,
25384        vy: 0.0_f32,
25385        vz: 0.0_f32,
25386        afx: 0.0_f32,
25387        afy: 0.0_f32,
25388        afz: 0.0_f32,
25389        yaw: 0.0_f32,
25390        yaw_rate: 0.0_f32,
25391        type_mask: PositionTargetTypemask::DEFAULT,
25392        coordinate_frame: MavFrame::DEFAULT,
25393    };
25394    #[cfg(feature = "arbitrary")]
25395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25396        use arbitrary::{Arbitrary, Unstructured};
25397        let mut buf = [0u8; 1024];
25398        rng.fill_bytes(&mut buf);
25399        let mut unstructured = Unstructured::new(&buf);
25400        Self::arbitrary(&mut unstructured).unwrap_or_default()
25401    }
25402}
25403impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25404    fn default() -> Self {
25405        Self::DEFAULT.clone()
25406    }
25407}
25408impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25409    type Message = MavMessage;
25410    const ID: u32 = 85u32;
25411    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25412    const EXTRA_CRC: u8 = 140u8;
25413    const ENCODED_LEN: usize = 51usize;
25414    fn deser(
25415        _version: MavlinkVersion,
25416        __input: &[u8],
25417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25418        let avail_len = __input.len();
25419        let mut payload_buf = [0; Self::ENCODED_LEN];
25420        let mut buf = if avail_len < Self::ENCODED_LEN {
25421            payload_buf[0..avail_len].copy_from_slice(__input);
25422            Bytes::new(&payload_buf)
25423        } else {
25424            Bytes::new(__input)
25425        };
25426        let mut __struct = Self::default();
25427        __struct.time_boot_ms = buf.get_u32_le();
25428        __struct.x = buf.get_f32_le();
25429        __struct.y = buf.get_f32_le();
25430        __struct.z = buf.get_f32_le();
25431        __struct.vx = buf.get_f32_le();
25432        __struct.vy = buf.get_f32_le();
25433        __struct.vz = buf.get_f32_le();
25434        __struct.afx = buf.get_f32_le();
25435        __struct.afy = buf.get_f32_le();
25436        __struct.afz = buf.get_f32_le();
25437        __struct.yaw = buf.get_f32_le();
25438        __struct.yaw_rate = buf.get_f32_le();
25439        let tmp = buf.get_u16_le();
25440        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
25441            ::mavlink_core::error::ParserError::InvalidFlag {
25442                flag_type: "PositionTargetTypemask",
25443                value: tmp as u64,
25444            },
25445        )?;
25446        let tmp = buf.get_u8();
25447        __struct.coordinate_frame =
25448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25449                enum_type: "MavFrame",
25450                value: tmp as u64,
25451            })?;
25452        Ok(__struct)
25453    }
25454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25455        let mut __tmp = BytesMut::new(bytes);
25456        #[allow(clippy::absurd_extreme_comparisons)]
25457        #[allow(unused_comparisons)]
25458        if __tmp.remaining() < Self::ENCODED_LEN {
25459            panic!(
25460                "buffer is too small (need {} bytes, but got {})",
25461                Self::ENCODED_LEN,
25462                __tmp.remaining(),
25463            )
25464        }
25465        __tmp.put_u32_le(self.time_boot_ms);
25466        __tmp.put_f32_le(self.x);
25467        __tmp.put_f32_le(self.y);
25468        __tmp.put_f32_le(self.z);
25469        __tmp.put_f32_le(self.vx);
25470        __tmp.put_f32_le(self.vy);
25471        __tmp.put_f32_le(self.vz);
25472        __tmp.put_f32_le(self.afx);
25473        __tmp.put_f32_le(self.afy);
25474        __tmp.put_f32_le(self.afz);
25475        __tmp.put_f32_le(self.yaw);
25476        __tmp.put_f32_le(self.yaw_rate);
25477        __tmp.put_u16_le(self.type_mask.bits());
25478        __tmp.put_u8(self.coordinate_frame as u8);
25479        if matches!(version, MavlinkVersion::V2) {
25480            let len = __tmp.len();
25481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25482        } else {
25483            __tmp.len()
25484        }
25485    }
25486}
25487#[doc = "Power supply status."]
25488#[doc = ""]
25489#[doc = "ID: 125"]
25490#[derive(Debug, Clone, PartialEq)]
25491#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25493#[cfg_attr(feature = "ts", derive(TS))]
25494#[cfg_attr(feature = "ts", ts(export))]
25495pub struct POWER_STATUS_DATA {
25496    #[doc = "5V rail voltage."]
25497    pub Vcc: u16,
25498    #[doc = "Servo rail voltage."]
25499    pub Vservo: u16,
25500    #[doc = "Bitmap of power supply status flags."]
25501    pub flags: MavPowerStatus,
25502}
25503impl POWER_STATUS_DATA {
25504    pub const ENCODED_LEN: usize = 6usize;
25505    pub const DEFAULT: Self = Self {
25506        Vcc: 0_u16,
25507        Vservo: 0_u16,
25508        flags: MavPowerStatus::DEFAULT,
25509    };
25510    #[cfg(feature = "arbitrary")]
25511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25512        use arbitrary::{Arbitrary, Unstructured};
25513        let mut buf = [0u8; 1024];
25514        rng.fill_bytes(&mut buf);
25515        let mut unstructured = Unstructured::new(&buf);
25516        Self::arbitrary(&mut unstructured).unwrap_or_default()
25517    }
25518}
25519impl Default for POWER_STATUS_DATA {
25520    fn default() -> Self {
25521        Self::DEFAULT.clone()
25522    }
25523}
25524impl MessageData for POWER_STATUS_DATA {
25525    type Message = MavMessage;
25526    const ID: u32 = 125u32;
25527    const NAME: &'static str = "POWER_STATUS";
25528    const EXTRA_CRC: u8 = 203u8;
25529    const ENCODED_LEN: usize = 6usize;
25530    fn deser(
25531        _version: MavlinkVersion,
25532        __input: &[u8],
25533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25534        let avail_len = __input.len();
25535        let mut payload_buf = [0; Self::ENCODED_LEN];
25536        let mut buf = if avail_len < Self::ENCODED_LEN {
25537            payload_buf[0..avail_len].copy_from_slice(__input);
25538            Bytes::new(&payload_buf)
25539        } else {
25540            Bytes::new(__input)
25541        };
25542        let mut __struct = Self::default();
25543        __struct.Vcc = buf.get_u16_le();
25544        __struct.Vservo = buf.get_u16_le();
25545        let tmp = buf.get_u16_le();
25546        __struct.flags = MavPowerStatus::from_bits(tmp).ok_or(
25547            ::mavlink_core::error::ParserError::InvalidFlag {
25548                flag_type: "MavPowerStatus",
25549                value: tmp as u64,
25550            },
25551        )?;
25552        Ok(__struct)
25553    }
25554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25555        let mut __tmp = BytesMut::new(bytes);
25556        #[allow(clippy::absurd_extreme_comparisons)]
25557        #[allow(unused_comparisons)]
25558        if __tmp.remaining() < Self::ENCODED_LEN {
25559            panic!(
25560                "buffer is too small (need {} bytes, but got {})",
25561                Self::ENCODED_LEN,
25562                __tmp.remaining(),
25563            )
25564        }
25565        __tmp.put_u16_le(self.Vcc);
25566        __tmp.put_u16_le(self.Vservo);
25567        __tmp.put_u16_le(self.flags.bits());
25568        if matches!(version, MavlinkVersion::V2) {
25569            let len = __tmp.len();
25570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25571        } else {
25572            __tmp.len()
25573        }
25574    }
25575}
25576#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25577#[doc = ""]
25578#[doc = "ID: 300"]
25579#[derive(Debug, Clone, PartialEq)]
25580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25582#[cfg_attr(feature = "ts", derive(TS))]
25583#[cfg_attr(feature = "ts", ts(export))]
25584pub struct PROTOCOL_VERSION_DATA {
25585    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25586    pub version: u16,
25587    #[doc = "Minimum MAVLink version supported"]
25588    pub min_version: u16,
25589    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25590    pub max_version: u16,
25591    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25593    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25594    pub spec_version_hash: [u8; 8],
25595    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25596    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25597    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25598    pub library_version_hash: [u8; 8],
25599}
25600impl PROTOCOL_VERSION_DATA {
25601    pub const ENCODED_LEN: usize = 22usize;
25602    pub const DEFAULT: Self = Self {
25603        version: 0_u16,
25604        min_version: 0_u16,
25605        max_version: 0_u16,
25606        spec_version_hash: [0_u8; 8usize],
25607        library_version_hash: [0_u8; 8usize],
25608    };
25609    #[cfg(feature = "arbitrary")]
25610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25611        use arbitrary::{Arbitrary, Unstructured};
25612        let mut buf = [0u8; 1024];
25613        rng.fill_bytes(&mut buf);
25614        let mut unstructured = Unstructured::new(&buf);
25615        Self::arbitrary(&mut unstructured).unwrap_or_default()
25616    }
25617}
25618impl Default for PROTOCOL_VERSION_DATA {
25619    fn default() -> Self {
25620        Self::DEFAULT.clone()
25621    }
25622}
25623impl MessageData for PROTOCOL_VERSION_DATA {
25624    type Message = MavMessage;
25625    const ID: u32 = 300u32;
25626    const NAME: &'static str = "PROTOCOL_VERSION";
25627    const EXTRA_CRC: u8 = 217u8;
25628    const ENCODED_LEN: usize = 22usize;
25629    fn deser(
25630        _version: MavlinkVersion,
25631        __input: &[u8],
25632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25633        let avail_len = __input.len();
25634        let mut payload_buf = [0; Self::ENCODED_LEN];
25635        let mut buf = if avail_len < Self::ENCODED_LEN {
25636            payload_buf[0..avail_len].copy_from_slice(__input);
25637            Bytes::new(&payload_buf)
25638        } else {
25639            Bytes::new(__input)
25640        };
25641        let mut __struct = Self::default();
25642        __struct.version = buf.get_u16_le();
25643        __struct.min_version = buf.get_u16_le();
25644        __struct.max_version = buf.get_u16_le();
25645        for v in &mut __struct.spec_version_hash {
25646            let val = buf.get_u8();
25647            *v = val;
25648        }
25649        for v in &mut __struct.library_version_hash {
25650            let val = buf.get_u8();
25651            *v = val;
25652        }
25653        Ok(__struct)
25654    }
25655    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25656        let mut __tmp = BytesMut::new(bytes);
25657        #[allow(clippy::absurd_extreme_comparisons)]
25658        #[allow(unused_comparisons)]
25659        if __tmp.remaining() < Self::ENCODED_LEN {
25660            panic!(
25661                "buffer is too small (need {} bytes, but got {})",
25662                Self::ENCODED_LEN,
25663                __tmp.remaining(),
25664            )
25665        }
25666        __tmp.put_u16_le(self.version);
25667        __tmp.put_u16_le(self.min_version);
25668        __tmp.put_u16_le(self.max_version);
25669        for val in &self.spec_version_hash {
25670            __tmp.put_u8(*val);
25671        }
25672        for val in &self.library_version_hash {
25673            __tmp.put_u8(*val);
25674        }
25675        if matches!(version, MavlinkVersion::V2) {
25676            let len = __tmp.len();
25677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25678        } else {
25679            __tmp.len()
25680        }
25681    }
25682}
25683#[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
25684#[doc = ""]
25685#[doc = "ID: 420"]
25686#[derive(Debug, Clone, PartialEq)]
25687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25689#[cfg_attr(feature = "ts", derive(TS))]
25690#[cfg_attr(feature = "ts", ts(export))]
25691pub struct RADIO_RC_CHANNELS_DATA {
25692    #[doc = "Time when the data in the channels field were last updated (time since boot in the receiver's time domain)."]
25693    pub time_last_update_ms: u32,
25694    #[doc = "Radio RC channels status flags."]
25695    pub flags: RadioRcChannelsFlags,
25696    #[doc = "System ID (ID of target system, normally flight controller)."]
25697    pub target_system: u8,
25698    #[doc = "Component ID (normally 0 for broadcast)."]
25699    pub target_component: u8,
25700    #[doc = "Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message."]
25701    pub count: u8,
25702    #[doc = "RC channels.         Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500.         Channels with indexes equal or above count should be set to 0, to benefit from MAVLink's trailing-zero trimming."]
25703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25704    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25705    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25706    pub channels: [i16; 32],
25707}
25708impl RADIO_RC_CHANNELS_DATA {
25709    pub const ENCODED_LEN: usize = 73usize;
25710    pub const DEFAULT: Self = Self {
25711        time_last_update_ms: 0_u32,
25712        flags: RadioRcChannelsFlags::DEFAULT,
25713        target_system: 0_u8,
25714        target_component: 0_u8,
25715        count: 0_u8,
25716        channels: [0_i16; 32usize],
25717    };
25718    #[cfg(feature = "arbitrary")]
25719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25720        use arbitrary::{Arbitrary, Unstructured};
25721        let mut buf = [0u8; 1024];
25722        rng.fill_bytes(&mut buf);
25723        let mut unstructured = Unstructured::new(&buf);
25724        Self::arbitrary(&mut unstructured).unwrap_or_default()
25725    }
25726}
25727impl Default for RADIO_RC_CHANNELS_DATA {
25728    fn default() -> Self {
25729        Self::DEFAULT.clone()
25730    }
25731}
25732impl MessageData for RADIO_RC_CHANNELS_DATA {
25733    type Message = MavMessage;
25734    const ID: u32 = 420u32;
25735    const NAME: &'static str = "RADIO_RC_CHANNELS";
25736    const EXTRA_CRC: u8 = 20u8;
25737    const ENCODED_LEN: usize = 73usize;
25738    fn deser(
25739        _version: MavlinkVersion,
25740        __input: &[u8],
25741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25742        let avail_len = __input.len();
25743        let mut payload_buf = [0; Self::ENCODED_LEN];
25744        let mut buf = if avail_len < Self::ENCODED_LEN {
25745            payload_buf[0..avail_len].copy_from_slice(__input);
25746            Bytes::new(&payload_buf)
25747        } else {
25748            Bytes::new(__input)
25749        };
25750        let mut __struct = Self::default();
25751        __struct.time_last_update_ms = buf.get_u32_le();
25752        let tmp = buf.get_u16_le();
25753        __struct.flags = RadioRcChannelsFlags::from_bits(tmp).ok_or(
25754            ::mavlink_core::error::ParserError::InvalidFlag {
25755                flag_type: "RadioRcChannelsFlags",
25756                value: tmp as u64,
25757            },
25758        )?;
25759        __struct.target_system = buf.get_u8();
25760        __struct.target_component = buf.get_u8();
25761        __struct.count = buf.get_u8();
25762        for v in &mut __struct.channels {
25763            let val = buf.get_i16_le();
25764            *v = val;
25765        }
25766        Ok(__struct)
25767    }
25768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25769        let mut __tmp = BytesMut::new(bytes);
25770        #[allow(clippy::absurd_extreme_comparisons)]
25771        #[allow(unused_comparisons)]
25772        if __tmp.remaining() < Self::ENCODED_LEN {
25773            panic!(
25774                "buffer is too small (need {} bytes, but got {})",
25775                Self::ENCODED_LEN,
25776                __tmp.remaining(),
25777            )
25778        }
25779        __tmp.put_u32_le(self.time_last_update_ms);
25780        __tmp.put_u16_le(self.flags.bits());
25781        __tmp.put_u8(self.target_system);
25782        __tmp.put_u8(self.target_component);
25783        __tmp.put_u8(self.count);
25784        if matches!(version, MavlinkVersion::V2) {
25785            for val in &self.channels {
25786                __tmp.put_i16_le(*val);
25787            }
25788            let len = __tmp.len();
25789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25790        } else {
25791            __tmp.len()
25792        }
25793    }
25794}
25795#[doc = "Status generated by radio and injected into MAVLink stream."]
25796#[doc = ""]
25797#[doc = "ID: 109"]
25798#[derive(Debug, Clone, PartialEq)]
25799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25801#[cfg_attr(feature = "ts", derive(TS))]
25802#[cfg_attr(feature = "ts", ts(export))]
25803pub struct RADIO_STATUS_DATA {
25804    #[doc = "Count of radio packet receive errors (since boot)."]
25805    pub rxerrors: u16,
25806    #[doc = "Count of error corrected radio packets (since boot)."]
25807    pub fixed: u16,
25808    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25809    pub rssi: u8,
25810    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25811    pub remrssi: u8,
25812    #[doc = "Remaining free transmitter buffer space."]
25813    pub txbuf: u8,
25814    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25815    pub noise: u8,
25816    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25817    pub remnoise: u8,
25818}
25819impl RADIO_STATUS_DATA {
25820    pub const ENCODED_LEN: usize = 9usize;
25821    pub const DEFAULT: Self = Self {
25822        rxerrors: 0_u16,
25823        fixed: 0_u16,
25824        rssi: 0_u8,
25825        remrssi: 0_u8,
25826        txbuf: 0_u8,
25827        noise: 0_u8,
25828        remnoise: 0_u8,
25829    };
25830    #[cfg(feature = "arbitrary")]
25831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25832        use arbitrary::{Arbitrary, Unstructured};
25833        let mut buf = [0u8; 1024];
25834        rng.fill_bytes(&mut buf);
25835        let mut unstructured = Unstructured::new(&buf);
25836        Self::arbitrary(&mut unstructured).unwrap_or_default()
25837    }
25838}
25839impl Default for RADIO_STATUS_DATA {
25840    fn default() -> Self {
25841        Self::DEFAULT.clone()
25842    }
25843}
25844impl MessageData for RADIO_STATUS_DATA {
25845    type Message = MavMessage;
25846    const ID: u32 = 109u32;
25847    const NAME: &'static str = "RADIO_STATUS";
25848    const EXTRA_CRC: u8 = 185u8;
25849    const ENCODED_LEN: usize = 9usize;
25850    fn deser(
25851        _version: MavlinkVersion,
25852        __input: &[u8],
25853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25854        let avail_len = __input.len();
25855        let mut payload_buf = [0; Self::ENCODED_LEN];
25856        let mut buf = if avail_len < Self::ENCODED_LEN {
25857            payload_buf[0..avail_len].copy_from_slice(__input);
25858            Bytes::new(&payload_buf)
25859        } else {
25860            Bytes::new(__input)
25861        };
25862        let mut __struct = Self::default();
25863        __struct.rxerrors = buf.get_u16_le();
25864        __struct.fixed = buf.get_u16_le();
25865        __struct.rssi = buf.get_u8();
25866        __struct.remrssi = buf.get_u8();
25867        __struct.txbuf = buf.get_u8();
25868        __struct.noise = buf.get_u8();
25869        __struct.remnoise = buf.get_u8();
25870        Ok(__struct)
25871    }
25872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25873        let mut __tmp = BytesMut::new(bytes);
25874        #[allow(clippy::absurd_extreme_comparisons)]
25875        #[allow(unused_comparisons)]
25876        if __tmp.remaining() < Self::ENCODED_LEN {
25877            panic!(
25878                "buffer is too small (need {} bytes, but got {})",
25879                Self::ENCODED_LEN,
25880                __tmp.remaining(),
25881            )
25882        }
25883        __tmp.put_u16_le(self.rxerrors);
25884        __tmp.put_u16_le(self.fixed);
25885        __tmp.put_u8(self.rssi);
25886        __tmp.put_u8(self.remrssi);
25887        __tmp.put_u8(self.txbuf);
25888        __tmp.put_u8(self.noise);
25889        __tmp.put_u8(self.remnoise);
25890        if matches!(version, MavlinkVersion::V2) {
25891            let len = __tmp.len();
25892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25893        } else {
25894            __tmp.len()
25895        }
25896    }
25897}
25898#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25899#[doc = ""]
25900#[doc = "ID: 27"]
25901#[derive(Debug, Clone, PartialEq)]
25902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25904#[cfg_attr(feature = "ts", derive(TS))]
25905#[cfg_attr(feature = "ts", ts(export))]
25906pub struct RAW_IMU_DATA {
25907    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25908    pub time_usec: u64,
25909    #[doc = "X acceleration (raw)"]
25910    pub xacc: i16,
25911    #[doc = "Y acceleration (raw)"]
25912    pub yacc: i16,
25913    #[doc = "Z acceleration (raw)"]
25914    pub zacc: i16,
25915    #[doc = "Angular speed around X axis (raw)"]
25916    pub xgyro: i16,
25917    #[doc = "Angular speed around Y axis (raw)"]
25918    pub ygyro: i16,
25919    #[doc = "Angular speed around Z axis (raw)"]
25920    pub zgyro: i16,
25921    #[doc = "X Magnetic field (raw)"]
25922    pub xmag: i16,
25923    #[doc = "Y Magnetic field (raw)"]
25924    pub ymag: i16,
25925    #[doc = "Z Magnetic field (raw)"]
25926    pub zmag: i16,
25927    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25929    pub id: u8,
25930    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25932    pub temperature: i16,
25933}
25934impl RAW_IMU_DATA {
25935    pub const ENCODED_LEN: usize = 29usize;
25936    pub const DEFAULT: Self = Self {
25937        time_usec: 0_u64,
25938        xacc: 0_i16,
25939        yacc: 0_i16,
25940        zacc: 0_i16,
25941        xgyro: 0_i16,
25942        ygyro: 0_i16,
25943        zgyro: 0_i16,
25944        xmag: 0_i16,
25945        ymag: 0_i16,
25946        zmag: 0_i16,
25947        id: 0_u8,
25948        temperature: 0_i16,
25949    };
25950    #[cfg(feature = "arbitrary")]
25951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25952        use arbitrary::{Arbitrary, Unstructured};
25953        let mut buf = [0u8; 1024];
25954        rng.fill_bytes(&mut buf);
25955        let mut unstructured = Unstructured::new(&buf);
25956        Self::arbitrary(&mut unstructured).unwrap_or_default()
25957    }
25958}
25959impl Default for RAW_IMU_DATA {
25960    fn default() -> Self {
25961        Self::DEFAULT.clone()
25962    }
25963}
25964impl MessageData for RAW_IMU_DATA {
25965    type Message = MavMessage;
25966    const ID: u32 = 27u32;
25967    const NAME: &'static str = "RAW_IMU";
25968    const EXTRA_CRC: u8 = 144u8;
25969    const ENCODED_LEN: usize = 29usize;
25970    fn deser(
25971        _version: MavlinkVersion,
25972        __input: &[u8],
25973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25974        let avail_len = __input.len();
25975        let mut payload_buf = [0; Self::ENCODED_LEN];
25976        let mut buf = if avail_len < Self::ENCODED_LEN {
25977            payload_buf[0..avail_len].copy_from_slice(__input);
25978            Bytes::new(&payload_buf)
25979        } else {
25980            Bytes::new(__input)
25981        };
25982        let mut __struct = Self::default();
25983        __struct.time_usec = buf.get_u64_le();
25984        __struct.xacc = buf.get_i16_le();
25985        __struct.yacc = buf.get_i16_le();
25986        __struct.zacc = buf.get_i16_le();
25987        __struct.xgyro = buf.get_i16_le();
25988        __struct.ygyro = buf.get_i16_le();
25989        __struct.zgyro = buf.get_i16_le();
25990        __struct.xmag = buf.get_i16_le();
25991        __struct.ymag = buf.get_i16_le();
25992        __struct.zmag = buf.get_i16_le();
25993        __struct.id = buf.get_u8();
25994        __struct.temperature = buf.get_i16_le();
25995        Ok(__struct)
25996    }
25997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25998        let mut __tmp = BytesMut::new(bytes);
25999        #[allow(clippy::absurd_extreme_comparisons)]
26000        #[allow(unused_comparisons)]
26001        if __tmp.remaining() < Self::ENCODED_LEN {
26002            panic!(
26003                "buffer is too small (need {} bytes, but got {})",
26004                Self::ENCODED_LEN,
26005                __tmp.remaining(),
26006            )
26007        }
26008        __tmp.put_u64_le(self.time_usec);
26009        __tmp.put_i16_le(self.xacc);
26010        __tmp.put_i16_le(self.yacc);
26011        __tmp.put_i16_le(self.zacc);
26012        __tmp.put_i16_le(self.xgyro);
26013        __tmp.put_i16_le(self.ygyro);
26014        __tmp.put_i16_le(self.zgyro);
26015        __tmp.put_i16_le(self.xmag);
26016        __tmp.put_i16_le(self.ymag);
26017        __tmp.put_i16_le(self.zmag);
26018        if matches!(version, MavlinkVersion::V2) {
26019            __tmp.put_u8(self.id);
26020            __tmp.put_i16_le(self.temperature);
26021            let len = __tmp.len();
26022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26023        } else {
26024            __tmp.len()
26025        }
26026    }
26027}
26028#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26029#[doc = ""]
26030#[doc = "ID: 28"]
26031#[derive(Debug, Clone, PartialEq)]
26032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26034#[cfg_attr(feature = "ts", derive(TS))]
26035#[cfg_attr(feature = "ts", ts(export))]
26036pub struct RAW_PRESSURE_DATA {
26037    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26038    pub time_usec: u64,
26039    #[doc = "Absolute pressure (raw)"]
26040    pub press_abs: i16,
26041    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26042    pub press_diff1: i16,
26043    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26044    pub press_diff2: i16,
26045    #[doc = "Raw Temperature measurement (raw)"]
26046    pub temperature: i16,
26047}
26048impl RAW_PRESSURE_DATA {
26049    pub const ENCODED_LEN: usize = 16usize;
26050    pub const DEFAULT: Self = Self {
26051        time_usec: 0_u64,
26052        press_abs: 0_i16,
26053        press_diff1: 0_i16,
26054        press_diff2: 0_i16,
26055        temperature: 0_i16,
26056    };
26057    #[cfg(feature = "arbitrary")]
26058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26059        use arbitrary::{Arbitrary, Unstructured};
26060        let mut buf = [0u8; 1024];
26061        rng.fill_bytes(&mut buf);
26062        let mut unstructured = Unstructured::new(&buf);
26063        Self::arbitrary(&mut unstructured).unwrap_or_default()
26064    }
26065}
26066impl Default for RAW_PRESSURE_DATA {
26067    fn default() -> Self {
26068        Self::DEFAULT.clone()
26069    }
26070}
26071impl MessageData for RAW_PRESSURE_DATA {
26072    type Message = MavMessage;
26073    const ID: u32 = 28u32;
26074    const NAME: &'static str = "RAW_PRESSURE";
26075    const EXTRA_CRC: u8 = 67u8;
26076    const ENCODED_LEN: usize = 16usize;
26077    fn deser(
26078        _version: MavlinkVersion,
26079        __input: &[u8],
26080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26081        let avail_len = __input.len();
26082        let mut payload_buf = [0; Self::ENCODED_LEN];
26083        let mut buf = if avail_len < Self::ENCODED_LEN {
26084            payload_buf[0..avail_len].copy_from_slice(__input);
26085            Bytes::new(&payload_buf)
26086        } else {
26087            Bytes::new(__input)
26088        };
26089        let mut __struct = Self::default();
26090        __struct.time_usec = buf.get_u64_le();
26091        __struct.press_abs = buf.get_i16_le();
26092        __struct.press_diff1 = buf.get_i16_le();
26093        __struct.press_diff2 = buf.get_i16_le();
26094        __struct.temperature = buf.get_i16_le();
26095        Ok(__struct)
26096    }
26097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26098        let mut __tmp = BytesMut::new(bytes);
26099        #[allow(clippy::absurd_extreme_comparisons)]
26100        #[allow(unused_comparisons)]
26101        if __tmp.remaining() < Self::ENCODED_LEN {
26102            panic!(
26103                "buffer is too small (need {} bytes, but got {})",
26104                Self::ENCODED_LEN,
26105                __tmp.remaining(),
26106            )
26107        }
26108        __tmp.put_u64_le(self.time_usec);
26109        __tmp.put_i16_le(self.press_abs);
26110        __tmp.put_i16_le(self.press_diff1);
26111        __tmp.put_i16_le(self.press_diff2);
26112        __tmp.put_i16_le(self.temperature);
26113        if matches!(version, MavlinkVersion::V2) {
26114            let len = __tmp.len();
26115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26116        } else {
26117            __tmp.len()
26118        }
26119    }
26120}
26121#[doc = "RPM sensor data message."]
26122#[doc = ""]
26123#[doc = "ID: 339"]
26124#[derive(Debug, Clone, PartialEq)]
26125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26127#[cfg_attr(feature = "ts", derive(TS))]
26128#[cfg_attr(feature = "ts", ts(export))]
26129pub struct RAW_RPM_DATA {
26130    #[doc = "Indicated rate"]
26131    pub frequency: f32,
26132    #[doc = "Index of this RPM sensor (0-indexed)"]
26133    pub index: u8,
26134}
26135impl RAW_RPM_DATA {
26136    pub const ENCODED_LEN: usize = 5usize;
26137    pub const DEFAULT: Self = Self {
26138        frequency: 0.0_f32,
26139        index: 0_u8,
26140    };
26141    #[cfg(feature = "arbitrary")]
26142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26143        use arbitrary::{Arbitrary, Unstructured};
26144        let mut buf = [0u8; 1024];
26145        rng.fill_bytes(&mut buf);
26146        let mut unstructured = Unstructured::new(&buf);
26147        Self::arbitrary(&mut unstructured).unwrap_or_default()
26148    }
26149}
26150impl Default for RAW_RPM_DATA {
26151    fn default() -> Self {
26152        Self::DEFAULT.clone()
26153    }
26154}
26155impl MessageData for RAW_RPM_DATA {
26156    type Message = MavMessage;
26157    const ID: u32 = 339u32;
26158    const NAME: &'static str = "RAW_RPM";
26159    const EXTRA_CRC: u8 = 199u8;
26160    const ENCODED_LEN: usize = 5usize;
26161    fn deser(
26162        _version: MavlinkVersion,
26163        __input: &[u8],
26164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26165        let avail_len = __input.len();
26166        let mut payload_buf = [0; Self::ENCODED_LEN];
26167        let mut buf = if avail_len < Self::ENCODED_LEN {
26168            payload_buf[0..avail_len].copy_from_slice(__input);
26169            Bytes::new(&payload_buf)
26170        } else {
26171            Bytes::new(__input)
26172        };
26173        let mut __struct = Self::default();
26174        __struct.frequency = buf.get_f32_le();
26175        __struct.index = buf.get_u8();
26176        Ok(__struct)
26177    }
26178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26179        let mut __tmp = BytesMut::new(bytes);
26180        #[allow(clippy::absurd_extreme_comparisons)]
26181        #[allow(unused_comparisons)]
26182        if __tmp.remaining() < Self::ENCODED_LEN {
26183            panic!(
26184                "buffer is too small (need {} bytes, but got {})",
26185                Self::ENCODED_LEN,
26186                __tmp.remaining(),
26187            )
26188        }
26189        __tmp.put_f32_le(self.frequency);
26190        __tmp.put_u8(self.index);
26191        if matches!(version, MavlinkVersion::V2) {
26192            let len = __tmp.len();
26193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26194        } else {
26195            __tmp.len()
26196        }
26197    }
26198}
26199#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26200#[doc = ""]
26201#[doc = "ID: 65"]
26202#[derive(Debug, Clone, PartialEq)]
26203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26205#[cfg_attr(feature = "ts", derive(TS))]
26206#[cfg_attr(feature = "ts", ts(export))]
26207pub struct RC_CHANNELS_DATA {
26208    #[doc = "Timestamp (time since system boot)."]
26209    pub time_boot_ms: u32,
26210    #[doc = "RC channel 1 value."]
26211    pub chan1_raw: u16,
26212    #[doc = "RC channel 2 value."]
26213    pub chan2_raw: u16,
26214    #[doc = "RC channel 3 value."]
26215    pub chan3_raw: u16,
26216    #[doc = "RC channel 4 value."]
26217    pub chan4_raw: u16,
26218    #[doc = "RC channel 5 value."]
26219    pub chan5_raw: u16,
26220    #[doc = "RC channel 6 value."]
26221    pub chan6_raw: u16,
26222    #[doc = "RC channel 7 value."]
26223    pub chan7_raw: u16,
26224    #[doc = "RC channel 8 value."]
26225    pub chan8_raw: u16,
26226    #[doc = "RC channel 9 value."]
26227    pub chan9_raw: u16,
26228    #[doc = "RC channel 10 value."]
26229    pub chan10_raw: u16,
26230    #[doc = "RC channel 11 value."]
26231    pub chan11_raw: u16,
26232    #[doc = "RC channel 12 value."]
26233    pub chan12_raw: u16,
26234    #[doc = "RC channel 13 value."]
26235    pub chan13_raw: u16,
26236    #[doc = "RC channel 14 value."]
26237    pub chan14_raw: u16,
26238    #[doc = "RC channel 15 value."]
26239    pub chan15_raw: u16,
26240    #[doc = "RC channel 16 value."]
26241    pub chan16_raw: u16,
26242    #[doc = "RC channel 17 value."]
26243    pub chan17_raw: u16,
26244    #[doc = "RC channel 18 value."]
26245    pub chan18_raw: u16,
26246    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26247    pub chancount: u8,
26248    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26249    pub rssi: u8,
26250}
26251impl RC_CHANNELS_DATA {
26252    pub const ENCODED_LEN: usize = 42usize;
26253    pub const DEFAULT: Self = Self {
26254        time_boot_ms: 0_u32,
26255        chan1_raw: 0_u16,
26256        chan2_raw: 0_u16,
26257        chan3_raw: 0_u16,
26258        chan4_raw: 0_u16,
26259        chan5_raw: 0_u16,
26260        chan6_raw: 0_u16,
26261        chan7_raw: 0_u16,
26262        chan8_raw: 0_u16,
26263        chan9_raw: 0_u16,
26264        chan10_raw: 0_u16,
26265        chan11_raw: 0_u16,
26266        chan12_raw: 0_u16,
26267        chan13_raw: 0_u16,
26268        chan14_raw: 0_u16,
26269        chan15_raw: 0_u16,
26270        chan16_raw: 0_u16,
26271        chan17_raw: 0_u16,
26272        chan18_raw: 0_u16,
26273        chancount: 0_u8,
26274        rssi: 0_u8,
26275    };
26276    #[cfg(feature = "arbitrary")]
26277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26278        use arbitrary::{Arbitrary, Unstructured};
26279        let mut buf = [0u8; 1024];
26280        rng.fill_bytes(&mut buf);
26281        let mut unstructured = Unstructured::new(&buf);
26282        Self::arbitrary(&mut unstructured).unwrap_or_default()
26283    }
26284}
26285impl Default for RC_CHANNELS_DATA {
26286    fn default() -> Self {
26287        Self::DEFAULT.clone()
26288    }
26289}
26290impl MessageData for RC_CHANNELS_DATA {
26291    type Message = MavMessage;
26292    const ID: u32 = 65u32;
26293    const NAME: &'static str = "RC_CHANNELS";
26294    const EXTRA_CRC: u8 = 118u8;
26295    const ENCODED_LEN: usize = 42usize;
26296    fn deser(
26297        _version: MavlinkVersion,
26298        __input: &[u8],
26299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26300        let avail_len = __input.len();
26301        let mut payload_buf = [0; Self::ENCODED_LEN];
26302        let mut buf = if avail_len < Self::ENCODED_LEN {
26303            payload_buf[0..avail_len].copy_from_slice(__input);
26304            Bytes::new(&payload_buf)
26305        } else {
26306            Bytes::new(__input)
26307        };
26308        let mut __struct = Self::default();
26309        __struct.time_boot_ms = buf.get_u32_le();
26310        __struct.chan1_raw = buf.get_u16_le();
26311        __struct.chan2_raw = buf.get_u16_le();
26312        __struct.chan3_raw = buf.get_u16_le();
26313        __struct.chan4_raw = buf.get_u16_le();
26314        __struct.chan5_raw = buf.get_u16_le();
26315        __struct.chan6_raw = buf.get_u16_le();
26316        __struct.chan7_raw = buf.get_u16_le();
26317        __struct.chan8_raw = buf.get_u16_le();
26318        __struct.chan9_raw = buf.get_u16_le();
26319        __struct.chan10_raw = buf.get_u16_le();
26320        __struct.chan11_raw = buf.get_u16_le();
26321        __struct.chan12_raw = buf.get_u16_le();
26322        __struct.chan13_raw = buf.get_u16_le();
26323        __struct.chan14_raw = buf.get_u16_le();
26324        __struct.chan15_raw = buf.get_u16_le();
26325        __struct.chan16_raw = buf.get_u16_le();
26326        __struct.chan17_raw = buf.get_u16_le();
26327        __struct.chan18_raw = buf.get_u16_le();
26328        __struct.chancount = buf.get_u8();
26329        __struct.rssi = buf.get_u8();
26330        Ok(__struct)
26331    }
26332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26333        let mut __tmp = BytesMut::new(bytes);
26334        #[allow(clippy::absurd_extreme_comparisons)]
26335        #[allow(unused_comparisons)]
26336        if __tmp.remaining() < Self::ENCODED_LEN {
26337            panic!(
26338                "buffer is too small (need {} bytes, but got {})",
26339                Self::ENCODED_LEN,
26340                __tmp.remaining(),
26341            )
26342        }
26343        __tmp.put_u32_le(self.time_boot_ms);
26344        __tmp.put_u16_le(self.chan1_raw);
26345        __tmp.put_u16_le(self.chan2_raw);
26346        __tmp.put_u16_le(self.chan3_raw);
26347        __tmp.put_u16_le(self.chan4_raw);
26348        __tmp.put_u16_le(self.chan5_raw);
26349        __tmp.put_u16_le(self.chan6_raw);
26350        __tmp.put_u16_le(self.chan7_raw);
26351        __tmp.put_u16_le(self.chan8_raw);
26352        __tmp.put_u16_le(self.chan9_raw);
26353        __tmp.put_u16_le(self.chan10_raw);
26354        __tmp.put_u16_le(self.chan11_raw);
26355        __tmp.put_u16_le(self.chan12_raw);
26356        __tmp.put_u16_le(self.chan13_raw);
26357        __tmp.put_u16_le(self.chan14_raw);
26358        __tmp.put_u16_le(self.chan15_raw);
26359        __tmp.put_u16_le(self.chan16_raw);
26360        __tmp.put_u16_le(self.chan17_raw);
26361        __tmp.put_u16_le(self.chan18_raw);
26362        __tmp.put_u8(self.chancount);
26363        __tmp.put_u8(self.rssi);
26364        if matches!(version, MavlinkVersion::V2) {
26365            let len = __tmp.len();
26366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26367        } else {
26368            __tmp.len()
26369        }
26370    }
26371}
26372#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26373#[doc = ""]
26374#[doc = "ID: 70"]
26375#[derive(Debug, Clone, PartialEq)]
26376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26378#[cfg_attr(feature = "ts", derive(TS))]
26379#[cfg_attr(feature = "ts", ts(export))]
26380pub struct RC_CHANNELS_OVERRIDE_DATA {
26381    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26382    pub chan1_raw: u16,
26383    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26384    pub chan2_raw: u16,
26385    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26386    pub chan3_raw: u16,
26387    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26388    pub chan4_raw: u16,
26389    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26390    pub chan5_raw: u16,
26391    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26392    pub chan6_raw: u16,
26393    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26394    pub chan7_raw: u16,
26395    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26396    pub chan8_raw: u16,
26397    #[doc = "System ID"]
26398    pub target_system: u8,
26399    #[doc = "Component ID"]
26400    pub target_component: u8,
26401    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26403    pub chan9_raw: u16,
26404    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26406    pub chan10_raw: u16,
26407    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26408    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26409    pub chan11_raw: u16,
26410    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26411    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26412    pub chan12_raw: u16,
26413    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26414    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26415    pub chan13_raw: u16,
26416    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26417    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26418    pub chan14_raw: u16,
26419    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26420    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26421    pub chan15_raw: u16,
26422    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26423    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26424    pub chan16_raw: u16,
26425    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26427    pub chan17_raw: u16,
26428    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26430    pub chan18_raw: u16,
26431}
26432impl RC_CHANNELS_OVERRIDE_DATA {
26433    pub const ENCODED_LEN: usize = 38usize;
26434    pub const DEFAULT: Self = Self {
26435        chan1_raw: 0_u16,
26436        chan2_raw: 0_u16,
26437        chan3_raw: 0_u16,
26438        chan4_raw: 0_u16,
26439        chan5_raw: 0_u16,
26440        chan6_raw: 0_u16,
26441        chan7_raw: 0_u16,
26442        chan8_raw: 0_u16,
26443        target_system: 0_u8,
26444        target_component: 0_u8,
26445        chan9_raw: 0_u16,
26446        chan10_raw: 0_u16,
26447        chan11_raw: 0_u16,
26448        chan12_raw: 0_u16,
26449        chan13_raw: 0_u16,
26450        chan14_raw: 0_u16,
26451        chan15_raw: 0_u16,
26452        chan16_raw: 0_u16,
26453        chan17_raw: 0_u16,
26454        chan18_raw: 0_u16,
26455    };
26456    #[cfg(feature = "arbitrary")]
26457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26458        use arbitrary::{Arbitrary, Unstructured};
26459        let mut buf = [0u8; 1024];
26460        rng.fill_bytes(&mut buf);
26461        let mut unstructured = Unstructured::new(&buf);
26462        Self::arbitrary(&mut unstructured).unwrap_or_default()
26463    }
26464}
26465impl Default for RC_CHANNELS_OVERRIDE_DATA {
26466    fn default() -> Self {
26467        Self::DEFAULT.clone()
26468    }
26469}
26470impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26471    type Message = MavMessage;
26472    const ID: u32 = 70u32;
26473    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26474    const EXTRA_CRC: u8 = 124u8;
26475    const ENCODED_LEN: usize = 38usize;
26476    fn deser(
26477        _version: MavlinkVersion,
26478        __input: &[u8],
26479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26480        let avail_len = __input.len();
26481        let mut payload_buf = [0; Self::ENCODED_LEN];
26482        let mut buf = if avail_len < Self::ENCODED_LEN {
26483            payload_buf[0..avail_len].copy_from_slice(__input);
26484            Bytes::new(&payload_buf)
26485        } else {
26486            Bytes::new(__input)
26487        };
26488        let mut __struct = Self::default();
26489        __struct.chan1_raw = buf.get_u16_le();
26490        __struct.chan2_raw = buf.get_u16_le();
26491        __struct.chan3_raw = buf.get_u16_le();
26492        __struct.chan4_raw = buf.get_u16_le();
26493        __struct.chan5_raw = buf.get_u16_le();
26494        __struct.chan6_raw = buf.get_u16_le();
26495        __struct.chan7_raw = buf.get_u16_le();
26496        __struct.chan8_raw = buf.get_u16_le();
26497        __struct.target_system = buf.get_u8();
26498        __struct.target_component = buf.get_u8();
26499        __struct.chan9_raw = buf.get_u16_le();
26500        __struct.chan10_raw = buf.get_u16_le();
26501        __struct.chan11_raw = buf.get_u16_le();
26502        __struct.chan12_raw = buf.get_u16_le();
26503        __struct.chan13_raw = buf.get_u16_le();
26504        __struct.chan14_raw = buf.get_u16_le();
26505        __struct.chan15_raw = buf.get_u16_le();
26506        __struct.chan16_raw = buf.get_u16_le();
26507        __struct.chan17_raw = buf.get_u16_le();
26508        __struct.chan18_raw = buf.get_u16_le();
26509        Ok(__struct)
26510    }
26511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26512        let mut __tmp = BytesMut::new(bytes);
26513        #[allow(clippy::absurd_extreme_comparisons)]
26514        #[allow(unused_comparisons)]
26515        if __tmp.remaining() < Self::ENCODED_LEN {
26516            panic!(
26517                "buffer is too small (need {} bytes, but got {})",
26518                Self::ENCODED_LEN,
26519                __tmp.remaining(),
26520            )
26521        }
26522        __tmp.put_u16_le(self.chan1_raw);
26523        __tmp.put_u16_le(self.chan2_raw);
26524        __tmp.put_u16_le(self.chan3_raw);
26525        __tmp.put_u16_le(self.chan4_raw);
26526        __tmp.put_u16_le(self.chan5_raw);
26527        __tmp.put_u16_le(self.chan6_raw);
26528        __tmp.put_u16_le(self.chan7_raw);
26529        __tmp.put_u16_le(self.chan8_raw);
26530        __tmp.put_u8(self.target_system);
26531        __tmp.put_u8(self.target_component);
26532        if matches!(version, MavlinkVersion::V2) {
26533            __tmp.put_u16_le(self.chan9_raw);
26534            __tmp.put_u16_le(self.chan10_raw);
26535            __tmp.put_u16_le(self.chan11_raw);
26536            __tmp.put_u16_le(self.chan12_raw);
26537            __tmp.put_u16_le(self.chan13_raw);
26538            __tmp.put_u16_le(self.chan14_raw);
26539            __tmp.put_u16_le(self.chan15_raw);
26540            __tmp.put_u16_le(self.chan16_raw);
26541            __tmp.put_u16_le(self.chan17_raw);
26542            __tmp.put_u16_le(self.chan18_raw);
26543            let len = __tmp.len();
26544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26545        } else {
26546            __tmp.len()
26547        }
26548    }
26549}
26550#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26551#[doc = ""]
26552#[doc = "ID: 35"]
26553#[derive(Debug, Clone, PartialEq)]
26554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26556#[cfg_attr(feature = "ts", derive(TS))]
26557#[cfg_attr(feature = "ts", ts(export))]
26558pub struct RC_CHANNELS_RAW_DATA {
26559    #[doc = "Timestamp (time since system boot)."]
26560    pub time_boot_ms: u32,
26561    #[doc = "RC channel 1 value."]
26562    pub chan1_raw: u16,
26563    #[doc = "RC channel 2 value."]
26564    pub chan2_raw: u16,
26565    #[doc = "RC channel 3 value."]
26566    pub chan3_raw: u16,
26567    #[doc = "RC channel 4 value."]
26568    pub chan4_raw: u16,
26569    #[doc = "RC channel 5 value."]
26570    pub chan5_raw: u16,
26571    #[doc = "RC channel 6 value."]
26572    pub chan6_raw: u16,
26573    #[doc = "RC channel 7 value."]
26574    pub chan7_raw: u16,
26575    #[doc = "RC channel 8 value."]
26576    pub chan8_raw: u16,
26577    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26578    pub port: u8,
26579    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26580    pub rssi: u8,
26581}
26582impl RC_CHANNELS_RAW_DATA {
26583    pub const ENCODED_LEN: usize = 22usize;
26584    pub const DEFAULT: Self = Self {
26585        time_boot_ms: 0_u32,
26586        chan1_raw: 0_u16,
26587        chan2_raw: 0_u16,
26588        chan3_raw: 0_u16,
26589        chan4_raw: 0_u16,
26590        chan5_raw: 0_u16,
26591        chan6_raw: 0_u16,
26592        chan7_raw: 0_u16,
26593        chan8_raw: 0_u16,
26594        port: 0_u8,
26595        rssi: 0_u8,
26596    };
26597    #[cfg(feature = "arbitrary")]
26598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26599        use arbitrary::{Arbitrary, Unstructured};
26600        let mut buf = [0u8; 1024];
26601        rng.fill_bytes(&mut buf);
26602        let mut unstructured = Unstructured::new(&buf);
26603        Self::arbitrary(&mut unstructured).unwrap_or_default()
26604    }
26605}
26606impl Default for RC_CHANNELS_RAW_DATA {
26607    fn default() -> Self {
26608        Self::DEFAULT.clone()
26609    }
26610}
26611impl MessageData for RC_CHANNELS_RAW_DATA {
26612    type Message = MavMessage;
26613    const ID: u32 = 35u32;
26614    const NAME: &'static str = "RC_CHANNELS_RAW";
26615    const EXTRA_CRC: u8 = 244u8;
26616    const ENCODED_LEN: usize = 22usize;
26617    fn deser(
26618        _version: MavlinkVersion,
26619        __input: &[u8],
26620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26621        let avail_len = __input.len();
26622        let mut payload_buf = [0; Self::ENCODED_LEN];
26623        let mut buf = if avail_len < Self::ENCODED_LEN {
26624            payload_buf[0..avail_len].copy_from_slice(__input);
26625            Bytes::new(&payload_buf)
26626        } else {
26627            Bytes::new(__input)
26628        };
26629        let mut __struct = Self::default();
26630        __struct.time_boot_ms = buf.get_u32_le();
26631        __struct.chan1_raw = buf.get_u16_le();
26632        __struct.chan2_raw = buf.get_u16_le();
26633        __struct.chan3_raw = buf.get_u16_le();
26634        __struct.chan4_raw = buf.get_u16_le();
26635        __struct.chan5_raw = buf.get_u16_le();
26636        __struct.chan6_raw = buf.get_u16_le();
26637        __struct.chan7_raw = buf.get_u16_le();
26638        __struct.chan8_raw = buf.get_u16_le();
26639        __struct.port = buf.get_u8();
26640        __struct.rssi = buf.get_u8();
26641        Ok(__struct)
26642    }
26643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26644        let mut __tmp = BytesMut::new(bytes);
26645        #[allow(clippy::absurd_extreme_comparisons)]
26646        #[allow(unused_comparisons)]
26647        if __tmp.remaining() < Self::ENCODED_LEN {
26648            panic!(
26649                "buffer is too small (need {} bytes, but got {})",
26650                Self::ENCODED_LEN,
26651                __tmp.remaining(),
26652            )
26653        }
26654        __tmp.put_u32_le(self.time_boot_ms);
26655        __tmp.put_u16_le(self.chan1_raw);
26656        __tmp.put_u16_le(self.chan2_raw);
26657        __tmp.put_u16_le(self.chan3_raw);
26658        __tmp.put_u16_le(self.chan4_raw);
26659        __tmp.put_u16_le(self.chan5_raw);
26660        __tmp.put_u16_le(self.chan6_raw);
26661        __tmp.put_u16_le(self.chan7_raw);
26662        __tmp.put_u16_le(self.chan8_raw);
26663        __tmp.put_u8(self.port);
26664        __tmp.put_u8(self.rssi);
26665        if matches!(version, MavlinkVersion::V2) {
26666            let len = __tmp.len();
26667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26668        } else {
26669            __tmp.len()
26670        }
26671    }
26672}
26673#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26674#[doc = ""]
26675#[doc = "ID: 34"]
26676#[derive(Debug, Clone, PartialEq)]
26677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26679#[cfg_attr(feature = "ts", derive(TS))]
26680#[cfg_attr(feature = "ts", ts(export))]
26681pub struct RC_CHANNELS_SCALED_DATA {
26682    #[doc = "Timestamp (time since system boot)."]
26683    pub time_boot_ms: u32,
26684    #[doc = "RC channel 1 value scaled."]
26685    pub chan1_scaled: i16,
26686    #[doc = "RC channel 2 value scaled."]
26687    pub chan2_scaled: i16,
26688    #[doc = "RC channel 3 value scaled."]
26689    pub chan3_scaled: i16,
26690    #[doc = "RC channel 4 value scaled."]
26691    pub chan4_scaled: i16,
26692    #[doc = "RC channel 5 value scaled."]
26693    pub chan5_scaled: i16,
26694    #[doc = "RC channel 6 value scaled."]
26695    pub chan6_scaled: i16,
26696    #[doc = "RC channel 7 value scaled."]
26697    pub chan7_scaled: i16,
26698    #[doc = "RC channel 8 value scaled."]
26699    pub chan8_scaled: i16,
26700    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26701    pub port: u8,
26702    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26703    pub rssi: u8,
26704}
26705impl RC_CHANNELS_SCALED_DATA {
26706    pub const ENCODED_LEN: usize = 22usize;
26707    pub const DEFAULT: Self = Self {
26708        time_boot_ms: 0_u32,
26709        chan1_scaled: 0_i16,
26710        chan2_scaled: 0_i16,
26711        chan3_scaled: 0_i16,
26712        chan4_scaled: 0_i16,
26713        chan5_scaled: 0_i16,
26714        chan6_scaled: 0_i16,
26715        chan7_scaled: 0_i16,
26716        chan8_scaled: 0_i16,
26717        port: 0_u8,
26718        rssi: 0_u8,
26719    };
26720    #[cfg(feature = "arbitrary")]
26721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26722        use arbitrary::{Arbitrary, Unstructured};
26723        let mut buf = [0u8; 1024];
26724        rng.fill_bytes(&mut buf);
26725        let mut unstructured = Unstructured::new(&buf);
26726        Self::arbitrary(&mut unstructured).unwrap_or_default()
26727    }
26728}
26729impl Default for RC_CHANNELS_SCALED_DATA {
26730    fn default() -> Self {
26731        Self::DEFAULT.clone()
26732    }
26733}
26734impl MessageData for RC_CHANNELS_SCALED_DATA {
26735    type Message = MavMessage;
26736    const ID: u32 = 34u32;
26737    const NAME: &'static str = "RC_CHANNELS_SCALED";
26738    const EXTRA_CRC: u8 = 237u8;
26739    const ENCODED_LEN: usize = 22usize;
26740    fn deser(
26741        _version: MavlinkVersion,
26742        __input: &[u8],
26743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26744        let avail_len = __input.len();
26745        let mut payload_buf = [0; Self::ENCODED_LEN];
26746        let mut buf = if avail_len < Self::ENCODED_LEN {
26747            payload_buf[0..avail_len].copy_from_slice(__input);
26748            Bytes::new(&payload_buf)
26749        } else {
26750            Bytes::new(__input)
26751        };
26752        let mut __struct = Self::default();
26753        __struct.time_boot_ms = buf.get_u32_le();
26754        __struct.chan1_scaled = buf.get_i16_le();
26755        __struct.chan2_scaled = buf.get_i16_le();
26756        __struct.chan3_scaled = buf.get_i16_le();
26757        __struct.chan4_scaled = buf.get_i16_le();
26758        __struct.chan5_scaled = buf.get_i16_le();
26759        __struct.chan6_scaled = buf.get_i16_le();
26760        __struct.chan7_scaled = buf.get_i16_le();
26761        __struct.chan8_scaled = buf.get_i16_le();
26762        __struct.port = buf.get_u8();
26763        __struct.rssi = buf.get_u8();
26764        Ok(__struct)
26765    }
26766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26767        let mut __tmp = BytesMut::new(bytes);
26768        #[allow(clippy::absurd_extreme_comparisons)]
26769        #[allow(unused_comparisons)]
26770        if __tmp.remaining() < Self::ENCODED_LEN {
26771            panic!(
26772                "buffer is too small (need {} bytes, but got {})",
26773                Self::ENCODED_LEN,
26774                __tmp.remaining(),
26775            )
26776        }
26777        __tmp.put_u32_le(self.time_boot_ms);
26778        __tmp.put_i16_le(self.chan1_scaled);
26779        __tmp.put_i16_le(self.chan2_scaled);
26780        __tmp.put_i16_le(self.chan3_scaled);
26781        __tmp.put_i16_le(self.chan4_scaled);
26782        __tmp.put_i16_le(self.chan5_scaled);
26783        __tmp.put_i16_le(self.chan6_scaled);
26784        __tmp.put_i16_le(self.chan7_scaled);
26785        __tmp.put_i16_le(self.chan8_scaled);
26786        __tmp.put_u8(self.port);
26787        __tmp.put_u8(self.rssi);
26788        if matches!(version, MavlinkVersion::V2) {
26789            let len = __tmp.len();
26790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26791        } else {
26792            __tmp.len()
26793        }
26794    }
26795}
26796#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26797#[doc = "Request a data stream."]
26798#[doc = ""]
26799#[doc = "ID: 66"]
26800#[derive(Debug, Clone, PartialEq)]
26801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26803#[cfg_attr(feature = "ts", derive(TS))]
26804#[cfg_attr(feature = "ts", ts(export))]
26805pub struct REQUEST_DATA_STREAM_DATA {
26806    #[doc = "The requested message rate"]
26807    pub req_message_rate: u16,
26808    #[doc = "The target requested to send the message stream."]
26809    pub target_system: u8,
26810    #[doc = "The target requested to send the message stream."]
26811    pub target_component: u8,
26812    #[doc = "The ID of the requested data stream"]
26813    pub req_stream_id: u8,
26814    #[doc = "1 to start sending, 0 to stop sending."]
26815    pub start_stop: u8,
26816}
26817impl REQUEST_DATA_STREAM_DATA {
26818    pub const ENCODED_LEN: usize = 6usize;
26819    pub const DEFAULT: Self = Self {
26820        req_message_rate: 0_u16,
26821        target_system: 0_u8,
26822        target_component: 0_u8,
26823        req_stream_id: 0_u8,
26824        start_stop: 0_u8,
26825    };
26826    #[cfg(feature = "arbitrary")]
26827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26828        use arbitrary::{Arbitrary, Unstructured};
26829        let mut buf = [0u8; 1024];
26830        rng.fill_bytes(&mut buf);
26831        let mut unstructured = Unstructured::new(&buf);
26832        Self::arbitrary(&mut unstructured).unwrap_or_default()
26833    }
26834}
26835impl Default for REQUEST_DATA_STREAM_DATA {
26836    fn default() -> Self {
26837        Self::DEFAULT.clone()
26838    }
26839}
26840impl MessageData for REQUEST_DATA_STREAM_DATA {
26841    type Message = MavMessage;
26842    const ID: u32 = 66u32;
26843    const NAME: &'static str = "REQUEST_DATA_STREAM";
26844    const EXTRA_CRC: u8 = 148u8;
26845    const ENCODED_LEN: usize = 6usize;
26846    fn deser(
26847        _version: MavlinkVersion,
26848        __input: &[u8],
26849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26850        let avail_len = __input.len();
26851        let mut payload_buf = [0; Self::ENCODED_LEN];
26852        let mut buf = if avail_len < Self::ENCODED_LEN {
26853            payload_buf[0..avail_len].copy_from_slice(__input);
26854            Bytes::new(&payload_buf)
26855        } else {
26856            Bytes::new(__input)
26857        };
26858        let mut __struct = Self::default();
26859        __struct.req_message_rate = buf.get_u16_le();
26860        __struct.target_system = buf.get_u8();
26861        __struct.target_component = buf.get_u8();
26862        __struct.req_stream_id = buf.get_u8();
26863        __struct.start_stop = buf.get_u8();
26864        Ok(__struct)
26865    }
26866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26867        let mut __tmp = BytesMut::new(bytes);
26868        #[allow(clippy::absurd_extreme_comparisons)]
26869        #[allow(unused_comparisons)]
26870        if __tmp.remaining() < Self::ENCODED_LEN {
26871            panic!(
26872                "buffer is too small (need {} bytes, but got {})",
26873                Self::ENCODED_LEN,
26874                __tmp.remaining(),
26875            )
26876        }
26877        __tmp.put_u16_le(self.req_message_rate);
26878        __tmp.put_u8(self.target_system);
26879        __tmp.put_u8(self.target_component);
26880        __tmp.put_u8(self.req_stream_id);
26881        __tmp.put_u8(self.start_stop);
26882        if matches!(version, MavlinkVersion::V2) {
26883            let len = __tmp.len();
26884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26885        } else {
26886            __tmp.len()
26887        }
26888    }
26889}
26890#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26891#[doc = ""]
26892#[doc = "ID: 412"]
26893#[derive(Debug, Clone, PartialEq)]
26894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26896#[cfg_attr(feature = "ts", derive(TS))]
26897#[cfg_attr(feature = "ts", ts(export))]
26898pub struct REQUEST_EVENT_DATA {
26899    #[doc = "First sequence number of the requested event."]
26900    pub first_sequence: u16,
26901    #[doc = "Last sequence number of the requested event."]
26902    pub last_sequence: u16,
26903    #[doc = "System ID"]
26904    pub target_system: u8,
26905    #[doc = "Component ID"]
26906    pub target_component: u8,
26907}
26908impl REQUEST_EVENT_DATA {
26909    pub const ENCODED_LEN: usize = 6usize;
26910    pub const DEFAULT: Self = Self {
26911        first_sequence: 0_u16,
26912        last_sequence: 0_u16,
26913        target_system: 0_u8,
26914        target_component: 0_u8,
26915    };
26916    #[cfg(feature = "arbitrary")]
26917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26918        use arbitrary::{Arbitrary, Unstructured};
26919        let mut buf = [0u8; 1024];
26920        rng.fill_bytes(&mut buf);
26921        let mut unstructured = Unstructured::new(&buf);
26922        Self::arbitrary(&mut unstructured).unwrap_or_default()
26923    }
26924}
26925impl Default for REQUEST_EVENT_DATA {
26926    fn default() -> Self {
26927        Self::DEFAULT.clone()
26928    }
26929}
26930impl MessageData for REQUEST_EVENT_DATA {
26931    type Message = MavMessage;
26932    const ID: u32 = 412u32;
26933    const NAME: &'static str = "REQUEST_EVENT";
26934    const EXTRA_CRC: u8 = 33u8;
26935    const ENCODED_LEN: usize = 6usize;
26936    fn deser(
26937        _version: MavlinkVersion,
26938        __input: &[u8],
26939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26940        let avail_len = __input.len();
26941        let mut payload_buf = [0; Self::ENCODED_LEN];
26942        let mut buf = if avail_len < Self::ENCODED_LEN {
26943            payload_buf[0..avail_len].copy_from_slice(__input);
26944            Bytes::new(&payload_buf)
26945        } else {
26946            Bytes::new(__input)
26947        };
26948        let mut __struct = Self::default();
26949        __struct.first_sequence = buf.get_u16_le();
26950        __struct.last_sequence = buf.get_u16_le();
26951        __struct.target_system = buf.get_u8();
26952        __struct.target_component = buf.get_u8();
26953        Ok(__struct)
26954    }
26955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26956        let mut __tmp = BytesMut::new(bytes);
26957        #[allow(clippy::absurd_extreme_comparisons)]
26958        #[allow(unused_comparisons)]
26959        if __tmp.remaining() < Self::ENCODED_LEN {
26960            panic!(
26961                "buffer is too small (need {} bytes, but got {})",
26962                Self::ENCODED_LEN,
26963                __tmp.remaining(),
26964            )
26965        }
26966        __tmp.put_u16_le(self.first_sequence);
26967        __tmp.put_u16_le(self.last_sequence);
26968        __tmp.put_u8(self.target_system);
26969        __tmp.put_u8(self.target_component);
26970        if matches!(version, MavlinkVersion::V2) {
26971            let len = __tmp.len();
26972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26973        } else {
26974            __tmp.len()
26975        }
26976    }
26977}
26978#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26979#[doc = ""]
26980#[doc = "ID: 142"]
26981#[derive(Debug, Clone, PartialEq)]
26982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26984#[cfg_attr(feature = "ts", derive(TS))]
26985#[cfg_attr(feature = "ts", ts(export))]
26986pub struct RESOURCE_REQUEST_DATA {
26987    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26988    pub request_id: u8,
26989    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26990    pub uri_type: u8,
26991    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26994    pub uri: [u8; 120],
26995    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26996    pub transfer_type: u8,
26997    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26999    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27000    pub storage: [u8; 120],
27001}
27002impl RESOURCE_REQUEST_DATA {
27003    pub const ENCODED_LEN: usize = 243usize;
27004    pub const DEFAULT: Self = Self {
27005        request_id: 0_u8,
27006        uri_type: 0_u8,
27007        uri: [0_u8; 120usize],
27008        transfer_type: 0_u8,
27009        storage: [0_u8; 120usize],
27010    };
27011    #[cfg(feature = "arbitrary")]
27012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27013        use arbitrary::{Arbitrary, Unstructured};
27014        let mut buf = [0u8; 1024];
27015        rng.fill_bytes(&mut buf);
27016        let mut unstructured = Unstructured::new(&buf);
27017        Self::arbitrary(&mut unstructured).unwrap_or_default()
27018    }
27019}
27020impl Default for RESOURCE_REQUEST_DATA {
27021    fn default() -> Self {
27022        Self::DEFAULT.clone()
27023    }
27024}
27025impl MessageData for RESOURCE_REQUEST_DATA {
27026    type Message = MavMessage;
27027    const ID: u32 = 142u32;
27028    const NAME: &'static str = "RESOURCE_REQUEST";
27029    const EXTRA_CRC: u8 = 72u8;
27030    const ENCODED_LEN: usize = 243usize;
27031    fn deser(
27032        _version: MavlinkVersion,
27033        __input: &[u8],
27034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27035        let avail_len = __input.len();
27036        let mut payload_buf = [0; Self::ENCODED_LEN];
27037        let mut buf = if avail_len < Self::ENCODED_LEN {
27038            payload_buf[0..avail_len].copy_from_slice(__input);
27039            Bytes::new(&payload_buf)
27040        } else {
27041            Bytes::new(__input)
27042        };
27043        let mut __struct = Self::default();
27044        __struct.request_id = buf.get_u8();
27045        __struct.uri_type = buf.get_u8();
27046        for v in &mut __struct.uri {
27047            let val = buf.get_u8();
27048            *v = val;
27049        }
27050        __struct.transfer_type = buf.get_u8();
27051        for v in &mut __struct.storage {
27052            let val = buf.get_u8();
27053            *v = val;
27054        }
27055        Ok(__struct)
27056    }
27057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27058        let mut __tmp = BytesMut::new(bytes);
27059        #[allow(clippy::absurd_extreme_comparisons)]
27060        #[allow(unused_comparisons)]
27061        if __tmp.remaining() < Self::ENCODED_LEN {
27062            panic!(
27063                "buffer is too small (need {} bytes, but got {})",
27064                Self::ENCODED_LEN,
27065                __tmp.remaining(),
27066            )
27067        }
27068        __tmp.put_u8(self.request_id);
27069        __tmp.put_u8(self.uri_type);
27070        for val in &self.uri {
27071            __tmp.put_u8(*val);
27072        }
27073        __tmp.put_u8(self.transfer_type);
27074        for val in &self.storage {
27075            __tmp.put_u8(*val);
27076        }
27077        if matches!(version, MavlinkVersion::V2) {
27078            let len = __tmp.len();
27079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27080        } else {
27081            __tmp.len()
27082        }
27083    }
27084}
27085#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27086#[doc = ""]
27087#[doc = "ID: 413"]
27088#[derive(Debug, Clone, PartialEq)]
27089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27091#[cfg_attr(feature = "ts", derive(TS))]
27092#[cfg_attr(feature = "ts", ts(export))]
27093pub struct RESPONSE_EVENT_ERROR_DATA {
27094    #[doc = "Sequence number."]
27095    pub sequence: u16,
27096    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27097    pub sequence_oldest_available: u16,
27098    #[doc = "System ID"]
27099    pub target_system: u8,
27100    #[doc = "Component ID"]
27101    pub target_component: u8,
27102    #[doc = "Error reason."]
27103    pub reason: MavEventErrorReason,
27104}
27105impl RESPONSE_EVENT_ERROR_DATA {
27106    pub const ENCODED_LEN: usize = 7usize;
27107    pub const DEFAULT: Self = Self {
27108        sequence: 0_u16,
27109        sequence_oldest_available: 0_u16,
27110        target_system: 0_u8,
27111        target_component: 0_u8,
27112        reason: MavEventErrorReason::DEFAULT,
27113    };
27114    #[cfg(feature = "arbitrary")]
27115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27116        use arbitrary::{Arbitrary, Unstructured};
27117        let mut buf = [0u8; 1024];
27118        rng.fill_bytes(&mut buf);
27119        let mut unstructured = Unstructured::new(&buf);
27120        Self::arbitrary(&mut unstructured).unwrap_or_default()
27121    }
27122}
27123impl Default for RESPONSE_EVENT_ERROR_DATA {
27124    fn default() -> Self {
27125        Self::DEFAULT.clone()
27126    }
27127}
27128impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27129    type Message = MavMessage;
27130    const ID: u32 = 413u32;
27131    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27132    const EXTRA_CRC: u8 = 77u8;
27133    const ENCODED_LEN: usize = 7usize;
27134    fn deser(
27135        _version: MavlinkVersion,
27136        __input: &[u8],
27137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27138        let avail_len = __input.len();
27139        let mut payload_buf = [0; Self::ENCODED_LEN];
27140        let mut buf = if avail_len < Self::ENCODED_LEN {
27141            payload_buf[0..avail_len].copy_from_slice(__input);
27142            Bytes::new(&payload_buf)
27143        } else {
27144            Bytes::new(__input)
27145        };
27146        let mut __struct = Self::default();
27147        __struct.sequence = buf.get_u16_le();
27148        __struct.sequence_oldest_available = buf.get_u16_le();
27149        __struct.target_system = buf.get_u8();
27150        __struct.target_component = buf.get_u8();
27151        let tmp = buf.get_u8();
27152        __struct.reason =
27153            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27154                enum_type: "MavEventErrorReason",
27155                value: tmp as u64,
27156            })?;
27157        Ok(__struct)
27158    }
27159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27160        let mut __tmp = BytesMut::new(bytes);
27161        #[allow(clippy::absurd_extreme_comparisons)]
27162        #[allow(unused_comparisons)]
27163        if __tmp.remaining() < Self::ENCODED_LEN {
27164            panic!(
27165                "buffer is too small (need {} bytes, but got {})",
27166                Self::ENCODED_LEN,
27167                __tmp.remaining(),
27168            )
27169        }
27170        __tmp.put_u16_le(self.sequence);
27171        __tmp.put_u16_le(self.sequence_oldest_available);
27172        __tmp.put_u8(self.target_system);
27173        __tmp.put_u8(self.target_component);
27174        __tmp.put_u8(self.reason as u8);
27175        if matches!(version, MavlinkVersion::V2) {
27176            let len = __tmp.len();
27177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27178        } else {
27179            __tmp.len()
27180        }
27181    }
27182}
27183#[doc = "Read out the safety zone the MAV currently assumes."]
27184#[doc = ""]
27185#[doc = "ID: 55"]
27186#[derive(Debug, Clone, PartialEq)]
27187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27189#[cfg_attr(feature = "ts", derive(TS))]
27190#[cfg_attr(feature = "ts", ts(export))]
27191pub struct SAFETY_ALLOWED_AREA_DATA {
27192    #[doc = "x position 1 / Latitude 1"]
27193    pub p1x: f32,
27194    #[doc = "y position 1 / Longitude 1"]
27195    pub p1y: f32,
27196    #[doc = "z position 1 / Altitude 1"]
27197    pub p1z: f32,
27198    #[doc = "x position 2 / Latitude 2"]
27199    pub p2x: f32,
27200    #[doc = "y position 2 / Longitude 2"]
27201    pub p2y: f32,
27202    #[doc = "z position 2 / Altitude 2"]
27203    pub p2z: f32,
27204    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27205    pub frame: MavFrame,
27206}
27207impl SAFETY_ALLOWED_AREA_DATA {
27208    pub const ENCODED_LEN: usize = 25usize;
27209    pub const DEFAULT: Self = Self {
27210        p1x: 0.0_f32,
27211        p1y: 0.0_f32,
27212        p1z: 0.0_f32,
27213        p2x: 0.0_f32,
27214        p2y: 0.0_f32,
27215        p2z: 0.0_f32,
27216        frame: MavFrame::DEFAULT,
27217    };
27218    #[cfg(feature = "arbitrary")]
27219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27220        use arbitrary::{Arbitrary, Unstructured};
27221        let mut buf = [0u8; 1024];
27222        rng.fill_bytes(&mut buf);
27223        let mut unstructured = Unstructured::new(&buf);
27224        Self::arbitrary(&mut unstructured).unwrap_or_default()
27225    }
27226}
27227impl Default for SAFETY_ALLOWED_AREA_DATA {
27228    fn default() -> Self {
27229        Self::DEFAULT.clone()
27230    }
27231}
27232impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27233    type Message = MavMessage;
27234    const ID: u32 = 55u32;
27235    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27236    const EXTRA_CRC: u8 = 3u8;
27237    const ENCODED_LEN: usize = 25usize;
27238    fn deser(
27239        _version: MavlinkVersion,
27240        __input: &[u8],
27241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27242        let avail_len = __input.len();
27243        let mut payload_buf = [0; Self::ENCODED_LEN];
27244        let mut buf = if avail_len < Self::ENCODED_LEN {
27245            payload_buf[0..avail_len].copy_from_slice(__input);
27246            Bytes::new(&payload_buf)
27247        } else {
27248            Bytes::new(__input)
27249        };
27250        let mut __struct = Self::default();
27251        __struct.p1x = buf.get_f32_le();
27252        __struct.p1y = buf.get_f32_le();
27253        __struct.p1z = buf.get_f32_le();
27254        __struct.p2x = buf.get_f32_le();
27255        __struct.p2y = buf.get_f32_le();
27256        __struct.p2z = buf.get_f32_le();
27257        let tmp = buf.get_u8();
27258        __struct.frame =
27259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27260                enum_type: "MavFrame",
27261                value: tmp as u64,
27262            })?;
27263        Ok(__struct)
27264    }
27265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27266        let mut __tmp = BytesMut::new(bytes);
27267        #[allow(clippy::absurd_extreme_comparisons)]
27268        #[allow(unused_comparisons)]
27269        if __tmp.remaining() < Self::ENCODED_LEN {
27270            panic!(
27271                "buffer is too small (need {} bytes, but got {})",
27272                Self::ENCODED_LEN,
27273                __tmp.remaining(),
27274            )
27275        }
27276        __tmp.put_f32_le(self.p1x);
27277        __tmp.put_f32_le(self.p1y);
27278        __tmp.put_f32_le(self.p1z);
27279        __tmp.put_f32_le(self.p2x);
27280        __tmp.put_f32_le(self.p2y);
27281        __tmp.put_f32_le(self.p2z);
27282        __tmp.put_u8(self.frame as u8);
27283        if matches!(version, MavlinkVersion::V2) {
27284            let len = __tmp.len();
27285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27286        } else {
27287            __tmp.len()
27288        }
27289    }
27290}
27291#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27292#[doc = ""]
27293#[doc = "ID: 54"]
27294#[derive(Debug, Clone, PartialEq)]
27295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27297#[cfg_attr(feature = "ts", derive(TS))]
27298#[cfg_attr(feature = "ts", ts(export))]
27299pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27300    #[doc = "x position 1 / Latitude 1"]
27301    pub p1x: f32,
27302    #[doc = "y position 1 / Longitude 1"]
27303    pub p1y: f32,
27304    #[doc = "z position 1 / Altitude 1"]
27305    pub p1z: f32,
27306    #[doc = "x position 2 / Latitude 2"]
27307    pub p2x: f32,
27308    #[doc = "y position 2 / Longitude 2"]
27309    pub p2y: f32,
27310    #[doc = "z position 2 / Altitude 2"]
27311    pub p2z: f32,
27312    #[doc = "System ID"]
27313    pub target_system: u8,
27314    #[doc = "Component ID"]
27315    pub target_component: u8,
27316    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27317    pub frame: MavFrame,
27318}
27319impl SAFETY_SET_ALLOWED_AREA_DATA {
27320    pub const ENCODED_LEN: usize = 27usize;
27321    pub const DEFAULT: Self = Self {
27322        p1x: 0.0_f32,
27323        p1y: 0.0_f32,
27324        p1z: 0.0_f32,
27325        p2x: 0.0_f32,
27326        p2y: 0.0_f32,
27327        p2z: 0.0_f32,
27328        target_system: 0_u8,
27329        target_component: 0_u8,
27330        frame: MavFrame::DEFAULT,
27331    };
27332    #[cfg(feature = "arbitrary")]
27333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27334        use arbitrary::{Arbitrary, Unstructured};
27335        let mut buf = [0u8; 1024];
27336        rng.fill_bytes(&mut buf);
27337        let mut unstructured = Unstructured::new(&buf);
27338        Self::arbitrary(&mut unstructured).unwrap_or_default()
27339    }
27340}
27341impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27342    fn default() -> Self {
27343        Self::DEFAULT.clone()
27344    }
27345}
27346impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27347    type Message = MavMessage;
27348    const ID: u32 = 54u32;
27349    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27350    const EXTRA_CRC: u8 = 15u8;
27351    const ENCODED_LEN: usize = 27usize;
27352    fn deser(
27353        _version: MavlinkVersion,
27354        __input: &[u8],
27355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27356        let avail_len = __input.len();
27357        let mut payload_buf = [0; Self::ENCODED_LEN];
27358        let mut buf = if avail_len < Self::ENCODED_LEN {
27359            payload_buf[0..avail_len].copy_from_slice(__input);
27360            Bytes::new(&payload_buf)
27361        } else {
27362            Bytes::new(__input)
27363        };
27364        let mut __struct = Self::default();
27365        __struct.p1x = buf.get_f32_le();
27366        __struct.p1y = buf.get_f32_le();
27367        __struct.p1z = buf.get_f32_le();
27368        __struct.p2x = buf.get_f32_le();
27369        __struct.p2y = buf.get_f32_le();
27370        __struct.p2z = buf.get_f32_le();
27371        __struct.target_system = buf.get_u8();
27372        __struct.target_component = buf.get_u8();
27373        let tmp = buf.get_u8();
27374        __struct.frame =
27375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27376                enum_type: "MavFrame",
27377                value: tmp as u64,
27378            })?;
27379        Ok(__struct)
27380    }
27381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27382        let mut __tmp = BytesMut::new(bytes);
27383        #[allow(clippy::absurd_extreme_comparisons)]
27384        #[allow(unused_comparisons)]
27385        if __tmp.remaining() < Self::ENCODED_LEN {
27386            panic!(
27387                "buffer is too small (need {} bytes, but got {})",
27388                Self::ENCODED_LEN,
27389                __tmp.remaining(),
27390            )
27391        }
27392        __tmp.put_f32_le(self.p1x);
27393        __tmp.put_f32_le(self.p1y);
27394        __tmp.put_f32_le(self.p1z);
27395        __tmp.put_f32_le(self.p2x);
27396        __tmp.put_f32_le(self.p2y);
27397        __tmp.put_f32_le(self.p2z);
27398        __tmp.put_u8(self.target_system);
27399        __tmp.put_u8(self.target_component);
27400        __tmp.put_u8(self.frame as u8);
27401        if matches!(version, MavlinkVersion::V2) {
27402            let len = __tmp.len();
27403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27404        } else {
27405            __tmp.len()
27406        }
27407    }
27408}
27409#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27410#[doc = ""]
27411#[doc = "ID: 26"]
27412#[derive(Debug, Clone, PartialEq)]
27413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27415#[cfg_attr(feature = "ts", derive(TS))]
27416#[cfg_attr(feature = "ts", ts(export))]
27417pub struct SCALED_IMU_DATA {
27418    #[doc = "Timestamp (time since system boot)."]
27419    pub time_boot_ms: u32,
27420    #[doc = "X acceleration"]
27421    pub xacc: i16,
27422    #[doc = "Y acceleration"]
27423    pub yacc: i16,
27424    #[doc = "Z acceleration"]
27425    pub zacc: i16,
27426    #[doc = "Angular speed around X axis"]
27427    pub xgyro: i16,
27428    #[doc = "Angular speed around Y axis"]
27429    pub ygyro: i16,
27430    #[doc = "Angular speed around Z axis"]
27431    pub zgyro: i16,
27432    #[doc = "X Magnetic field"]
27433    pub xmag: i16,
27434    #[doc = "Y Magnetic field"]
27435    pub ymag: i16,
27436    #[doc = "Z Magnetic field"]
27437    pub zmag: i16,
27438    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27440    pub temperature: i16,
27441}
27442impl SCALED_IMU_DATA {
27443    pub const ENCODED_LEN: usize = 24usize;
27444    pub const DEFAULT: Self = Self {
27445        time_boot_ms: 0_u32,
27446        xacc: 0_i16,
27447        yacc: 0_i16,
27448        zacc: 0_i16,
27449        xgyro: 0_i16,
27450        ygyro: 0_i16,
27451        zgyro: 0_i16,
27452        xmag: 0_i16,
27453        ymag: 0_i16,
27454        zmag: 0_i16,
27455        temperature: 0_i16,
27456    };
27457    #[cfg(feature = "arbitrary")]
27458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27459        use arbitrary::{Arbitrary, Unstructured};
27460        let mut buf = [0u8; 1024];
27461        rng.fill_bytes(&mut buf);
27462        let mut unstructured = Unstructured::new(&buf);
27463        Self::arbitrary(&mut unstructured).unwrap_or_default()
27464    }
27465}
27466impl Default for SCALED_IMU_DATA {
27467    fn default() -> Self {
27468        Self::DEFAULT.clone()
27469    }
27470}
27471impl MessageData for SCALED_IMU_DATA {
27472    type Message = MavMessage;
27473    const ID: u32 = 26u32;
27474    const NAME: &'static str = "SCALED_IMU";
27475    const EXTRA_CRC: u8 = 170u8;
27476    const ENCODED_LEN: usize = 24usize;
27477    fn deser(
27478        _version: MavlinkVersion,
27479        __input: &[u8],
27480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27481        let avail_len = __input.len();
27482        let mut payload_buf = [0; Self::ENCODED_LEN];
27483        let mut buf = if avail_len < Self::ENCODED_LEN {
27484            payload_buf[0..avail_len].copy_from_slice(__input);
27485            Bytes::new(&payload_buf)
27486        } else {
27487            Bytes::new(__input)
27488        };
27489        let mut __struct = Self::default();
27490        __struct.time_boot_ms = buf.get_u32_le();
27491        __struct.xacc = buf.get_i16_le();
27492        __struct.yacc = buf.get_i16_le();
27493        __struct.zacc = buf.get_i16_le();
27494        __struct.xgyro = buf.get_i16_le();
27495        __struct.ygyro = buf.get_i16_le();
27496        __struct.zgyro = buf.get_i16_le();
27497        __struct.xmag = buf.get_i16_le();
27498        __struct.ymag = buf.get_i16_le();
27499        __struct.zmag = buf.get_i16_le();
27500        __struct.temperature = buf.get_i16_le();
27501        Ok(__struct)
27502    }
27503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27504        let mut __tmp = BytesMut::new(bytes);
27505        #[allow(clippy::absurd_extreme_comparisons)]
27506        #[allow(unused_comparisons)]
27507        if __tmp.remaining() < Self::ENCODED_LEN {
27508            panic!(
27509                "buffer is too small (need {} bytes, but got {})",
27510                Self::ENCODED_LEN,
27511                __tmp.remaining(),
27512            )
27513        }
27514        __tmp.put_u32_le(self.time_boot_ms);
27515        __tmp.put_i16_le(self.xacc);
27516        __tmp.put_i16_le(self.yacc);
27517        __tmp.put_i16_le(self.zacc);
27518        __tmp.put_i16_le(self.xgyro);
27519        __tmp.put_i16_le(self.ygyro);
27520        __tmp.put_i16_le(self.zgyro);
27521        __tmp.put_i16_le(self.xmag);
27522        __tmp.put_i16_le(self.ymag);
27523        __tmp.put_i16_le(self.zmag);
27524        if matches!(version, MavlinkVersion::V2) {
27525            __tmp.put_i16_le(self.temperature);
27526            let len = __tmp.len();
27527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27528        } else {
27529            __tmp.len()
27530        }
27531    }
27532}
27533#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27534#[doc = ""]
27535#[doc = "ID: 116"]
27536#[derive(Debug, Clone, PartialEq)]
27537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27539#[cfg_attr(feature = "ts", derive(TS))]
27540#[cfg_attr(feature = "ts", ts(export))]
27541pub struct SCALED_IMU2_DATA {
27542    #[doc = "Timestamp (time since system boot)."]
27543    pub time_boot_ms: u32,
27544    #[doc = "X acceleration"]
27545    pub xacc: i16,
27546    #[doc = "Y acceleration"]
27547    pub yacc: i16,
27548    #[doc = "Z acceleration"]
27549    pub zacc: i16,
27550    #[doc = "Angular speed around X axis"]
27551    pub xgyro: i16,
27552    #[doc = "Angular speed around Y axis"]
27553    pub ygyro: i16,
27554    #[doc = "Angular speed around Z axis"]
27555    pub zgyro: i16,
27556    #[doc = "X Magnetic field"]
27557    pub xmag: i16,
27558    #[doc = "Y Magnetic field"]
27559    pub ymag: i16,
27560    #[doc = "Z Magnetic field"]
27561    pub zmag: i16,
27562    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27564    pub temperature: i16,
27565}
27566impl SCALED_IMU2_DATA {
27567    pub const ENCODED_LEN: usize = 24usize;
27568    pub const DEFAULT: Self = Self {
27569        time_boot_ms: 0_u32,
27570        xacc: 0_i16,
27571        yacc: 0_i16,
27572        zacc: 0_i16,
27573        xgyro: 0_i16,
27574        ygyro: 0_i16,
27575        zgyro: 0_i16,
27576        xmag: 0_i16,
27577        ymag: 0_i16,
27578        zmag: 0_i16,
27579        temperature: 0_i16,
27580    };
27581    #[cfg(feature = "arbitrary")]
27582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27583        use arbitrary::{Arbitrary, Unstructured};
27584        let mut buf = [0u8; 1024];
27585        rng.fill_bytes(&mut buf);
27586        let mut unstructured = Unstructured::new(&buf);
27587        Self::arbitrary(&mut unstructured).unwrap_or_default()
27588    }
27589}
27590impl Default for SCALED_IMU2_DATA {
27591    fn default() -> Self {
27592        Self::DEFAULT.clone()
27593    }
27594}
27595impl MessageData for SCALED_IMU2_DATA {
27596    type Message = MavMessage;
27597    const ID: u32 = 116u32;
27598    const NAME: &'static str = "SCALED_IMU2";
27599    const EXTRA_CRC: u8 = 76u8;
27600    const ENCODED_LEN: usize = 24usize;
27601    fn deser(
27602        _version: MavlinkVersion,
27603        __input: &[u8],
27604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27605        let avail_len = __input.len();
27606        let mut payload_buf = [0; Self::ENCODED_LEN];
27607        let mut buf = if avail_len < Self::ENCODED_LEN {
27608            payload_buf[0..avail_len].copy_from_slice(__input);
27609            Bytes::new(&payload_buf)
27610        } else {
27611            Bytes::new(__input)
27612        };
27613        let mut __struct = Self::default();
27614        __struct.time_boot_ms = buf.get_u32_le();
27615        __struct.xacc = buf.get_i16_le();
27616        __struct.yacc = buf.get_i16_le();
27617        __struct.zacc = buf.get_i16_le();
27618        __struct.xgyro = buf.get_i16_le();
27619        __struct.ygyro = buf.get_i16_le();
27620        __struct.zgyro = buf.get_i16_le();
27621        __struct.xmag = buf.get_i16_le();
27622        __struct.ymag = buf.get_i16_le();
27623        __struct.zmag = buf.get_i16_le();
27624        __struct.temperature = buf.get_i16_le();
27625        Ok(__struct)
27626    }
27627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27628        let mut __tmp = BytesMut::new(bytes);
27629        #[allow(clippy::absurd_extreme_comparisons)]
27630        #[allow(unused_comparisons)]
27631        if __tmp.remaining() < Self::ENCODED_LEN {
27632            panic!(
27633                "buffer is too small (need {} bytes, but got {})",
27634                Self::ENCODED_LEN,
27635                __tmp.remaining(),
27636            )
27637        }
27638        __tmp.put_u32_le(self.time_boot_ms);
27639        __tmp.put_i16_le(self.xacc);
27640        __tmp.put_i16_le(self.yacc);
27641        __tmp.put_i16_le(self.zacc);
27642        __tmp.put_i16_le(self.xgyro);
27643        __tmp.put_i16_le(self.ygyro);
27644        __tmp.put_i16_le(self.zgyro);
27645        __tmp.put_i16_le(self.xmag);
27646        __tmp.put_i16_le(self.ymag);
27647        __tmp.put_i16_le(self.zmag);
27648        if matches!(version, MavlinkVersion::V2) {
27649            __tmp.put_i16_le(self.temperature);
27650            let len = __tmp.len();
27651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27652        } else {
27653            __tmp.len()
27654        }
27655    }
27656}
27657#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27658#[doc = ""]
27659#[doc = "ID: 129"]
27660#[derive(Debug, Clone, PartialEq)]
27661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27663#[cfg_attr(feature = "ts", derive(TS))]
27664#[cfg_attr(feature = "ts", ts(export))]
27665pub struct SCALED_IMU3_DATA {
27666    #[doc = "Timestamp (time since system boot)."]
27667    pub time_boot_ms: u32,
27668    #[doc = "X acceleration"]
27669    pub xacc: i16,
27670    #[doc = "Y acceleration"]
27671    pub yacc: i16,
27672    #[doc = "Z acceleration"]
27673    pub zacc: i16,
27674    #[doc = "Angular speed around X axis"]
27675    pub xgyro: i16,
27676    #[doc = "Angular speed around Y axis"]
27677    pub ygyro: i16,
27678    #[doc = "Angular speed around Z axis"]
27679    pub zgyro: i16,
27680    #[doc = "X Magnetic field"]
27681    pub xmag: i16,
27682    #[doc = "Y Magnetic field"]
27683    pub ymag: i16,
27684    #[doc = "Z Magnetic field"]
27685    pub zmag: i16,
27686    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27687    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27688    pub temperature: i16,
27689}
27690impl SCALED_IMU3_DATA {
27691    pub const ENCODED_LEN: usize = 24usize;
27692    pub const DEFAULT: Self = Self {
27693        time_boot_ms: 0_u32,
27694        xacc: 0_i16,
27695        yacc: 0_i16,
27696        zacc: 0_i16,
27697        xgyro: 0_i16,
27698        ygyro: 0_i16,
27699        zgyro: 0_i16,
27700        xmag: 0_i16,
27701        ymag: 0_i16,
27702        zmag: 0_i16,
27703        temperature: 0_i16,
27704    };
27705    #[cfg(feature = "arbitrary")]
27706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27707        use arbitrary::{Arbitrary, Unstructured};
27708        let mut buf = [0u8; 1024];
27709        rng.fill_bytes(&mut buf);
27710        let mut unstructured = Unstructured::new(&buf);
27711        Self::arbitrary(&mut unstructured).unwrap_or_default()
27712    }
27713}
27714impl Default for SCALED_IMU3_DATA {
27715    fn default() -> Self {
27716        Self::DEFAULT.clone()
27717    }
27718}
27719impl MessageData for SCALED_IMU3_DATA {
27720    type Message = MavMessage;
27721    const ID: u32 = 129u32;
27722    const NAME: &'static str = "SCALED_IMU3";
27723    const EXTRA_CRC: u8 = 46u8;
27724    const ENCODED_LEN: usize = 24usize;
27725    fn deser(
27726        _version: MavlinkVersion,
27727        __input: &[u8],
27728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27729        let avail_len = __input.len();
27730        let mut payload_buf = [0; Self::ENCODED_LEN];
27731        let mut buf = if avail_len < Self::ENCODED_LEN {
27732            payload_buf[0..avail_len].copy_from_slice(__input);
27733            Bytes::new(&payload_buf)
27734        } else {
27735            Bytes::new(__input)
27736        };
27737        let mut __struct = Self::default();
27738        __struct.time_boot_ms = buf.get_u32_le();
27739        __struct.xacc = buf.get_i16_le();
27740        __struct.yacc = buf.get_i16_le();
27741        __struct.zacc = buf.get_i16_le();
27742        __struct.xgyro = buf.get_i16_le();
27743        __struct.ygyro = buf.get_i16_le();
27744        __struct.zgyro = buf.get_i16_le();
27745        __struct.xmag = buf.get_i16_le();
27746        __struct.ymag = buf.get_i16_le();
27747        __struct.zmag = buf.get_i16_le();
27748        __struct.temperature = buf.get_i16_le();
27749        Ok(__struct)
27750    }
27751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27752        let mut __tmp = BytesMut::new(bytes);
27753        #[allow(clippy::absurd_extreme_comparisons)]
27754        #[allow(unused_comparisons)]
27755        if __tmp.remaining() < Self::ENCODED_LEN {
27756            panic!(
27757                "buffer is too small (need {} bytes, but got {})",
27758                Self::ENCODED_LEN,
27759                __tmp.remaining(),
27760            )
27761        }
27762        __tmp.put_u32_le(self.time_boot_ms);
27763        __tmp.put_i16_le(self.xacc);
27764        __tmp.put_i16_le(self.yacc);
27765        __tmp.put_i16_le(self.zacc);
27766        __tmp.put_i16_le(self.xgyro);
27767        __tmp.put_i16_le(self.ygyro);
27768        __tmp.put_i16_le(self.zgyro);
27769        __tmp.put_i16_le(self.xmag);
27770        __tmp.put_i16_le(self.ymag);
27771        __tmp.put_i16_le(self.zmag);
27772        if matches!(version, MavlinkVersion::V2) {
27773            __tmp.put_i16_le(self.temperature);
27774            let len = __tmp.len();
27775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27776        } else {
27777            __tmp.len()
27778        }
27779    }
27780}
27781#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27782#[doc = ""]
27783#[doc = "ID: 29"]
27784#[derive(Debug, Clone, PartialEq)]
27785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27787#[cfg_attr(feature = "ts", derive(TS))]
27788#[cfg_attr(feature = "ts", ts(export))]
27789pub struct SCALED_PRESSURE_DATA {
27790    #[doc = "Timestamp (time since system boot)."]
27791    pub time_boot_ms: u32,
27792    #[doc = "Absolute pressure"]
27793    pub press_abs: f32,
27794    #[doc = "Differential pressure 1"]
27795    pub press_diff: f32,
27796    #[doc = "Absolute pressure temperature"]
27797    pub temperature: i16,
27798    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27800    pub temperature_press_diff: i16,
27801}
27802impl SCALED_PRESSURE_DATA {
27803    pub const ENCODED_LEN: usize = 16usize;
27804    pub const DEFAULT: Self = Self {
27805        time_boot_ms: 0_u32,
27806        press_abs: 0.0_f32,
27807        press_diff: 0.0_f32,
27808        temperature: 0_i16,
27809        temperature_press_diff: 0_i16,
27810    };
27811    #[cfg(feature = "arbitrary")]
27812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27813        use arbitrary::{Arbitrary, Unstructured};
27814        let mut buf = [0u8; 1024];
27815        rng.fill_bytes(&mut buf);
27816        let mut unstructured = Unstructured::new(&buf);
27817        Self::arbitrary(&mut unstructured).unwrap_or_default()
27818    }
27819}
27820impl Default for SCALED_PRESSURE_DATA {
27821    fn default() -> Self {
27822        Self::DEFAULT.clone()
27823    }
27824}
27825impl MessageData for SCALED_PRESSURE_DATA {
27826    type Message = MavMessage;
27827    const ID: u32 = 29u32;
27828    const NAME: &'static str = "SCALED_PRESSURE";
27829    const EXTRA_CRC: u8 = 115u8;
27830    const ENCODED_LEN: usize = 16usize;
27831    fn deser(
27832        _version: MavlinkVersion,
27833        __input: &[u8],
27834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27835        let avail_len = __input.len();
27836        let mut payload_buf = [0; Self::ENCODED_LEN];
27837        let mut buf = if avail_len < Self::ENCODED_LEN {
27838            payload_buf[0..avail_len].copy_from_slice(__input);
27839            Bytes::new(&payload_buf)
27840        } else {
27841            Bytes::new(__input)
27842        };
27843        let mut __struct = Self::default();
27844        __struct.time_boot_ms = buf.get_u32_le();
27845        __struct.press_abs = buf.get_f32_le();
27846        __struct.press_diff = buf.get_f32_le();
27847        __struct.temperature = buf.get_i16_le();
27848        __struct.temperature_press_diff = buf.get_i16_le();
27849        Ok(__struct)
27850    }
27851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27852        let mut __tmp = BytesMut::new(bytes);
27853        #[allow(clippy::absurd_extreme_comparisons)]
27854        #[allow(unused_comparisons)]
27855        if __tmp.remaining() < Self::ENCODED_LEN {
27856            panic!(
27857                "buffer is too small (need {} bytes, but got {})",
27858                Self::ENCODED_LEN,
27859                __tmp.remaining(),
27860            )
27861        }
27862        __tmp.put_u32_le(self.time_boot_ms);
27863        __tmp.put_f32_le(self.press_abs);
27864        __tmp.put_f32_le(self.press_diff);
27865        __tmp.put_i16_le(self.temperature);
27866        if matches!(version, MavlinkVersion::V2) {
27867            __tmp.put_i16_le(self.temperature_press_diff);
27868            let len = __tmp.len();
27869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27870        } else {
27871            __tmp.len()
27872        }
27873    }
27874}
27875#[doc = "Barometer readings for 2nd barometer."]
27876#[doc = ""]
27877#[doc = "ID: 137"]
27878#[derive(Debug, Clone, PartialEq)]
27879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27881#[cfg_attr(feature = "ts", derive(TS))]
27882#[cfg_attr(feature = "ts", ts(export))]
27883pub struct SCALED_PRESSURE2_DATA {
27884    #[doc = "Timestamp (time since system boot)."]
27885    pub time_boot_ms: u32,
27886    #[doc = "Absolute pressure"]
27887    pub press_abs: f32,
27888    #[doc = "Differential pressure"]
27889    pub press_diff: f32,
27890    #[doc = "Absolute pressure temperature"]
27891    pub temperature: i16,
27892    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27894    pub temperature_press_diff: i16,
27895}
27896impl SCALED_PRESSURE2_DATA {
27897    pub const ENCODED_LEN: usize = 16usize;
27898    pub const DEFAULT: Self = Self {
27899        time_boot_ms: 0_u32,
27900        press_abs: 0.0_f32,
27901        press_diff: 0.0_f32,
27902        temperature: 0_i16,
27903        temperature_press_diff: 0_i16,
27904    };
27905    #[cfg(feature = "arbitrary")]
27906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27907        use arbitrary::{Arbitrary, Unstructured};
27908        let mut buf = [0u8; 1024];
27909        rng.fill_bytes(&mut buf);
27910        let mut unstructured = Unstructured::new(&buf);
27911        Self::arbitrary(&mut unstructured).unwrap_or_default()
27912    }
27913}
27914impl Default for SCALED_PRESSURE2_DATA {
27915    fn default() -> Self {
27916        Self::DEFAULT.clone()
27917    }
27918}
27919impl MessageData for SCALED_PRESSURE2_DATA {
27920    type Message = MavMessage;
27921    const ID: u32 = 137u32;
27922    const NAME: &'static str = "SCALED_PRESSURE2";
27923    const EXTRA_CRC: u8 = 195u8;
27924    const ENCODED_LEN: usize = 16usize;
27925    fn deser(
27926        _version: MavlinkVersion,
27927        __input: &[u8],
27928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27929        let avail_len = __input.len();
27930        let mut payload_buf = [0; Self::ENCODED_LEN];
27931        let mut buf = if avail_len < Self::ENCODED_LEN {
27932            payload_buf[0..avail_len].copy_from_slice(__input);
27933            Bytes::new(&payload_buf)
27934        } else {
27935            Bytes::new(__input)
27936        };
27937        let mut __struct = Self::default();
27938        __struct.time_boot_ms = buf.get_u32_le();
27939        __struct.press_abs = buf.get_f32_le();
27940        __struct.press_diff = buf.get_f32_le();
27941        __struct.temperature = buf.get_i16_le();
27942        __struct.temperature_press_diff = buf.get_i16_le();
27943        Ok(__struct)
27944    }
27945    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27946        let mut __tmp = BytesMut::new(bytes);
27947        #[allow(clippy::absurd_extreme_comparisons)]
27948        #[allow(unused_comparisons)]
27949        if __tmp.remaining() < Self::ENCODED_LEN {
27950            panic!(
27951                "buffer is too small (need {} bytes, but got {})",
27952                Self::ENCODED_LEN,
27953                __tmp.remaining(),
27954            )
27955        }
27956        __tmp.put_u32_le(self.time_boot_ms);
27957        __tmp.put_f32_le(self.press_abs);
27958        __tmp.put_f32_le(self.press_diff);
27959        __tmp.put_i16_le(self.temperature);
27960        if matches!(version, MavlinkVersion::V2) {
27961            __tmp.put_i16_le(self.temperature_press_diff);
27962            let len = __tmp.len();
27963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27964        } else {
27965            __tmp.len()
27966        }
27967    }
27968}
27969#[doc = "Barometer readings for 3rd barometer."]
27970#[doc = ""]
27971#[doc = "ID: 143"]
27972#[derive(Debug, Clone, PartialEq)]
27973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27975#[cfg_attr(feature = "ts", derive(TS))]
27976#[cfg_attr(feature = "ts", ts(export))]
27977pub struct SCALED_PRESSURE3_DATA {
27978    #[doc = "Timestamp (time since system boot)."]
27979    pub time_boot_ms: u32,
27980    #[doc = "Absolute pressure"]
27981    pub press_abs: f32,
27982    #[doc = "Differential pressure"]
27983    pub press_diff: f32,
27984    #[doc = "Absolute pressure temperature"]
27985    pub temperature: i16,
27986    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27988    pub temperature_press_diff: i16,
27989}
27990impl SCALED_PRESSURE3_DATA {
27991    pub const ENCODED_LEN: usize = 16usize;
27992    pub const DEFAULT: Self = Self {
27993        time_boot_ms: 0_u32,
27994        press_abs: 0.0_f32,
27995        press_diff: 0.0_f32,
27996        temperature: 0_i16,
27997        temperature_press_diff: 0_i16,
27998    };
27999    #[cfg(feature = "arbitrary")]
28000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28001        use arbitrary::{Arbitrary, Unstructured};
28002        let mut buf = [0u8; 1024];
28003        rng.fill_bytes(&mut buf);
28004        let mut unstructured = Unstructured::new(&buf);
28005        Self::arbitrary(&mut unstructured).unwrap_or_default()
28006    }
28007}
28008impl Default for SCALED_PRESSURE3_DATA {
28009    fn default() -> Self {
28010        Self::DEFAULT.clone()
28011    }
28012}
28013impl MessageData for SCALED_PRESSURE3_DATA {
28014    type Message = MavMessage;
28015    const ID: u32 = 143u32;
28016    const NAME: &'static str = "SCALED_PRESSURE3";
28017    const EXTRA_CRC: u8 = 131u8;
28018    const ENCODED_LEN: usize = 16usize;
28019    fn deser(
28020        _version: MavlinkVersion,
28021        __input: &[u8],
28022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28023        let avail_len = __input.len();
28024        let mut payload_buf = [0; Self::ENCODED_LEN];
28025        let mut buf = if avail_len < Self::ENCODED_LEN {
28026            payload_buf[0..avail_len].copy_from_slice(__input);
28027            Bytes::new(&payload_buf)
28028        } else {
28029            Bytes::new(__input)
28030        };
28031        let mut __struct = Self::default();
28032        __struct.time_boot_ms = buf.get_u32_le();
28033        __struct.press_abs = buf.get_f32_le();
28034        __struct.press_diff = buf.get_f32_le();
28035        __struct.temperature = buf.get_i16_le();
28036        __struct.temperature_press_diff = buf.get_i16_le();
28037        Ok(__struct)
28038    }
28039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28040        let mut __tmp = BytesMut::new(bytes);
28041        #[allow(clippy::absurd_extreme_comparisons)]
28042        #[allow(unused_comparisons)]
28043        if __tmp.remaining() < Self::ENCODED_LEN {
28044            panic!(
28045                "buffer is too small (need {} bytes, but got {})",
28046                Self::ENCODED_LEN,
28047                __tmp.remaining(),
28048            )
28049        }
28050        __tmp.put_u32_le(self.time_boot_ms);
28051        __tmp.put_f32_le(self.press_abs);
28052        __tmp.put_f32_le(self.press_diff);
28053        __tmp.put_i16_le(self.temperature);
28054        if matches!(version, MavlinkVersion::V2) {
28055            __tmp.put_i16_le(self.temperature_press_diff);
28056            let len = __tmp.len();
28057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28058        } else {
28059            __tmp.len()
28060        }
28061    }
28062}
28063#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
28064#[doc = ""]
28065#[doc = "ID: 126"]
28066#[derive(Debug, Clone, PartialEq)]
28067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28069#[cfg_attr(feature = "ts", derive(TS))]
28070#[cfg_attr(feature = "ts", ts(export))]
28071pub struct SERIAL_CONTROL_DATA {
28072    #[doc = "Baudrate of transfer. Zero means no change."]
28073    pub baudrate: u32,
28074    #[doc = "Timeout for reply data"]
28075    pub timeout: u16,
28076    #[doc = "Serial control device type."]
28077    pub device: SerialControlDev,
28078    #[doc = "Bitmap of serial control flags."]
28079    pub flags: SerialControlFlag,
28080    #[doc = "how many bytes in this transfer"]
28081    pub count: u8,
28082    #[doc = "serial data"]
28083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28085    pub data: [u8; 70],
28086    #[doc = "System ID"]
28087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28088    pub target_system: u8,
28089    #[doc = "Component ID"]
28090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28091    pub target_component: u8,
28092}
28093impl SERIAL_CONTROL_DATA {
28094    pub const ENCODED_LEN: usize = 81usize;
28095    pub const DEFAULT: Self = Self {
28096        baudrate: 0_u32,
28097        timeout: 0_u16,
28098        device: SerialControlDev::DEFAULT,
28099        flags: SerialControlFlag::DEFAULT,
28100        count: 0_u8,
28101        data: [0_u8; 70usize],
28102        target_system: 0_u8,
28103        target_component: 0_u8,
28104    };
28105    #[cfg(feature = "arbitrary")]
28106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28107        use arbitrary::{Arbitrary, Unstructured};
28108        let mut buf = [0u8; 1024];
28109        rng.fill_bytes(&mut buf);
28110        let mut unstructured = Unstructured::new(&buf);
28111        Self::arbitrary(&mut unstructured).unwrap_or_default()
28112    }
28113}
28114impl Default for SERIAL_CONTROL_DATA {
28115    fn default() -> Self {
28116        Self::DEFAULT.clone()
28117    }
28118}
28119impl MessageData for SERIAL_CONTROL_DATA {
28120    type Message = MavMessage;
28121    const ID: u32 = 126u32;
28122    const NAME: &'static str = "SERIAL_CONTROL";
28123    const EXTRA_CRC: u8 = 220u8;
28124    const ENCODED_LEN: usize = 81usize;
28125    fn deser(
28126        _version: MavlinkVersion,
28127        __input: &[u8],
28128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28129        let avail_len = __input.len();
28130        let mut payload_buf = [0; Self::ENCODED_LEN];
28131        let mut buf = if avail_len < Self::ENCODED_LEN {
28132            payload_buf[0..avail_len].copy_from_slice(__input);
28133            Bytes::new(&payload_buf)
28134        } else {
28135            Bytes::new(__input)
28136        };
28137        let mut __struct = Self::default();
28138        __struct.baudrate = buf.get_u32_le();
28139        __struct.timeout = buf.get_u16_le();
28140        let tmp = buf.get_u8();
28141        __struct.device =
28142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28143                enum_type: "SerialControlDev",
28144                value: tmp as u64,
28145            })?;
28146        let tmp = buf.get_u8();
28147        __struct.flags = SerialControlFlag::from_bits(tmp).ok_or(
28148            ::mavlink_core::error::ParserError::InvalidFlag {
28149                flag_type: "SerialControlFlag",
28150                value: tmp as u64,
28151            },
28152        )?;
28153        __struct.count = buf.get_u8();
28154        for v in &mut __struct.data {
28155            let val = buf.get_u8();
28156            *v = val;
28157        }
28158        __struct.target_system = buf.get_u8();
28159        __struct.target_component = buf.get_u8();
28160        Ok(__struct)
28161    }
28162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28163        let mut __tmp = BytesMut::new(bytes);
28164        #[allow(clippy::absurd_extreme_comparisons)]
28165        #[allow(unused_comparisons)]
28166        if __tmp.remaining() < Self::ENCODED_LEN {
28167            panic!(
28168                "buffer is too small (need {} bytes, but got {})",
28169                Self::ENCODED_LEN,
28170                __tmp.remaining(),
28171            )
28172        }
28173        __tmp.put_u32_le(self.baudrate);
28174        __tmp.put_u16_le(self.timeout);
28175        __tmp.put_u8(self.device as u8);
28176        __tmp.put_u8(self.flags.bits());
28177        __tmp.put_u8(self.count);
28178        for val in &self.data {
28179            __tmp.put_u8(*val);
28180        }
28181        if matches!(version, MavlinkVersion::V2) {
28182            __tmp.put_u8(self.target_system);
28183            __tmp.put_u8(self.target_component);
28184            let len = __tmp.len();
28185            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28186        } else {
28187            __tmp.len()
28188        }
28189    }
28190}
28191#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28192#[doc = ""]
28193#[doc = "ID: 36"]
28194#[derive(Debug, Clone, PartialEq)]
28195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28196#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28197#[cfg_attr(feature = "ts", derive(TS))]
28198#[cfg_attr(feature = "ts", ts(export))]
28199pub struct SERVO_OUTPUT_RAW_DATA {
28200    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28201    pub time_usec: u32,
28202    #[doc = "Servo output 1 value"]
28203    pub servo1_raw: u16,
28204    #[doc = "Servo output 2 value"]
28205    pub servo2_raw: u16,
28206    #[doc = "Servo output 3 value"]
28207    pub servo3_raw: u16,
28208    #[doc = "Servo output 4 value"]
28209    pub servo4_raw: u16,
28210    #[doc = "Servo output 5 value"]
28211    pub servo5_raw: u16,
28212    #[doc = "Servo output 6 value"]
28213    pub servo6_raw: u16,
28214    #[doc = "Servo output 7 value"]
28215    pub servo7_raw: u16,
28216    #[doc = "Servo output 8 value"]
28217    pub servo8_raw: u16,
28218    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28219    pub port: u8,
28220    #[doc = "Servo output 9 value"]
28221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28222    pub servo9_raw: u16,
28223    #[doc = "Servo output 10 value"]
28224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28225    pub servo10_raw: u16,
28226    #[doc = "Servo output 11 value"]
28227    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28228    pub servo11_raw: u16,
28229    #[doc = "Servo output 12 value"]
28230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28231    pub servo12_raw: u16,
28232    #[doc = "Servo output 13 value"]
28233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28234    pub servo13_raw: u16,
28235    #[doc = "Servo output 14 value"]
28236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28237    pub servo14_raw: u16,
28238    #[doc = "Servo output 15 value"]
28239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28240    pub servo15_raw: u16,
28241    #[doc = "Servo output 16 value"]
28242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28243    pub servo16_raw: u16,
28244}
28245impl SERVO_OUTPUT_RAW_DATA {
28246    pub const ENCODED_LEN: usize = 37usize;
28247    pub const DEFAULT: Self = Self {
28248        time_usec: 0_u32,
28249        servo1_raw: 0_u16,
28250        servo2_raw: 0_u16,
28251        servo3_raw: 0_u16,
28252        servo4_raw: 0_u16,
28253        servo5_raw: 0_u16,
28254        servo6_raw: 0_u16,
28255        servo7_raw: 0_u16,
28256        servo8_raw: 0_u16,
28257        port: 0_u8,
28258        servo9_raw: 0_u16,
28259        servo10_raw: 0_u16,
28260        servo11_raw: 0_u16,
28261        servo12_raw: 0_u16,
28262        servo13_raw: 0_u16,
28263        servo14_raw: 0_u16,
28264        servo15_raw: 0_u16,
28265        servo16_raw: 0_u16,
28266    };
28267    #[cfg(feature = "arbitrary")]
28268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28269        use arbitrary::{Arbitrary, Unstructured};
28270        let mut buf = [0u8; 1024];
28271        rng.fill_bytes(&mut buf);
28272        let mut unstructured = Unstructured::new(&buf);
28273        Self::arbitrary(&mut unstructured).unwrap_or_default()
28274    }
28275}
28276impl Default for SERVO_OUTPUT_RAW_DATA {
28277    fn default() -> Self {
28278        Self::DEFAULT.clone()
28279    }
28280}
28281impl MessageData for SERVO_OUTPUT_RAW_DATA {
28282    type Message = MavMessage;
28283    const ID: u32 = 36u32;
28284    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28285    const EXTRA_CRC: u8 = 222u8;
28286    const ENCODED_LEN: usize = 37usize;
28287    fn deser(
28288        _version: MavlinkVersion,
28289        __input: &[u8],
28290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28291        let avail_len = __input.len();
28292        let mut payload_buf = [0; Self::ENCODED_LEN];
28293        let mut buf = if avail_len < Self::ENCODED_LEN {
28294            payload_buf[0..avail_len].copy_from_slice(__input);
28295            Bytes::new(&payload_buf)
28296        } else {
28297            Bytes::new(__input)
28298        };
28299        let mut __struct = Self::default();
28300        __struct.time_usec = buf.get_u32_le();
28301        __struct.servo1_raw = buf.get_u16_le();
28302        __struct.servo2_raw = buf.get_u16_le();
28303        __struct.servo3_raw = buf.get_u16_le();
28304        __struct.servo4_raw = buf.get_u16_le();
28305        __struct.servo5_raw = buf.get_u16_le();
28306        __struct.servo6_raw = buf.get_u16_le();
28307        __struct.servo7_raw = buf.get_u16_le();
28308        __struct.servo8_raw = buf.get_u16_le();
28309        __struct.port = buf.get_u8();
28310        __struct.servo9_raw = buf.get_u16_le();
28311        __struct.servo10_raw = buf.get_u16_le();
28312        __struct.servo11_raw = buf.get_u16_le();
28313        __struct.servo12_raw = buf.get_u16_le();
28314        __struct.servo13_raw = buf.get_u16_le();
28315        __struct.servo14_raw = buf.get_u16_le();
28316        __struct.servo15_raw = buf.get_u16_le();
28317        __struct.servo16_raw = buf.get_u16_le();
28318        Ok(__struct)
28319    }
28320    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28321        let mut __tmp = BytesMut::new(bytes);
28322        #[allow(clippy::absurd_extreme_comparisons)]
28323        #[allow(unused_comparisons)]
28324        if __tmp.remaining() < Self::ENCODED_LEN {
28325            panic!(
28326                "buffer is too small (need {} bytes, but got {})",
28327                Self::ENCODED_LEN,
28328                __tmp.remaining(),
28329            )
28330        }
28331        __tmp.put_u32_le(self.time_usec);
28332        __tmp.put_u16_le(self.servo1_raw);
28333        __tmp.put_u16_le(self.servo2_raw);
28334        __tmp.put_u16_le(self.servo3_raw);
28335        __tmp.put_u16_le(self.servo4_raw);
28336        __tmp.put_u16_le(self.servo5_raw);
28337        __tmp.put_u16_le(self.servo6_raw);
28338        __tmp.put_u16_le(self.servo7_raw);
28339        __tmp.put_u16_le(self.servo8_raw);
28340        __tmp.put_u8(self.port);
28341        if matches!(version, MavlinkVersion::V2) {
28342            __tmp.put_u16_le(self.servo9_raw);
28343            __tmp.put_u16_le(self.servo10_raw);
28344            __tmp.put_u16_le(self.servo11_raw);
28345            __tmp.put_u16_le(self.servo12_raw);
28346            __tmp.put_u16_le(self.servo13_raw);
28347            __tmp.put_u16_le(self.servo14_raw);
28348            __tmp.put_u16_le(self.servo15_raw);
28349            __tmp.put_u16_le(self.servo16_raw);
28350            let len = __tmp.len();
28351            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28352        } else {
28353            __tmp.len()
28354        }
28355    }
28356}
28357#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28358#[doc = ""]
28359#[doc = "ID: 256"]
28360#[derive(Debug, Clone, PartialEq)]
28361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28362#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28363#[cfg_attr(feature = "ts", derive(TS))]
28364#[cfg_attr(feature = "ts", ts(export))]
28365pub struct SETUP_SIGNING_DATA {
28366    #[doc = "initial timestamp"]
28367    pub initial_timestamp: u64,
28368    #[doc = "system id of the target"]
28369    pub target_system: u8,
28370    #[doc = "component ID of the target"]
28371    pub target_component: u8,
28372    #[doc = "signing key"]
28373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28375    pub secret_key: [u8; 32],
28376}
28377impl SETUP_SIGNING_DATA {
28378    pub const ENCODED_LEN: usize = 42usize;
28379    pub const DEFAULT: Self = Self {
28380        initial_timestamp: 0_u64,
28381        target_system: 0_u8,
28382        target_component: 0_u8,
28383        secret_key: [0_u8; 32usize],
28384    };
28385    #[cfg(feature = "arbitrary")]
28386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28387        use arbitrary::{Arbitrary, Unstructured};
28388        let mut buf = [0u8; 1024];
28389        rng.fill_bytes(&mut buf);
28390        let mut unstructured = Unstructured::new(&buf);
28391        Self::arbitrary(&mut unstructured).unwrap_or_default()
28392    }
28393}
28394impl Default for SETUP_SIGNING_DATA {
28395    fn default() -> Self {
28396        Self::DEFAULT.clone()
28397    }
28398}
28399impl MessageData for SETUP_SIGNING_DATA {
28400    type Message = MavMessage;
28401    const ID: u32 = 256u32;
28402    const NAME: &'static str = "SETUP_SIGNING";
28403    const EXTRA_CRC: u8 = 71u8;
28404    const ENCODED_LEN: usize = 42usize;
28405    fn deser(
28406        _version: MavlinkVersion,
28407        __input: &[u8],
28408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28409        let avail_len = __input.len();
28410        let mut payload_buf = [0; Self::ENCODED_LEN];
28411        let mut buf = if avail_len < Self::ENCODED_LEN {
28412            payload_buf[0..avail_len].copy_from_slice(__input);
28413            Bytes::new(&payload_buf)
28414        } else {
28415            Bytes::new(__input)
28416        };
28417        let mut __struct = Self::default();
28418        __struct.initial_timestamp = buf.get_u64_le();
28419        __struct.target_system = buf.get_u8();
28420        __struct.target_component = buf.get_u8();
28421        for v in &mut __struct.secret_key {
28422            let val = buf.get_u8();
28423            *v = val;
28424        }
28425        Ok(__struct)
28426    }
28427    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28428        let mut __tmp = BytesMut::new(bytes);
28429        #[allow(clippy::absurd_extreme_comparisons)]
28430        #[allow(unused_comparisons)]
28431        if __tmp.remaining() < Self::ENCODED_LEN {
28432            panic!(
28433                "buffer is too small (need {} bytes, but got {})",
28434                Self::ENCODED_LEN,
28435                __tmp.remaining(),
28436            )
28437        }
28438        __tmp.put_u64_le(self.initial_timestamp);
28439        __tmp.put_u8(self.target_system);
28440        __tmp.put_u8(self.target_component);
28441        for val in &self.secret_key {
28442            __tmp.put_u8(*val);
28443        }
28444        if matches!(version, MavlinkVersion::V2) {
28445            let len = __tmp.len();
28446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28447        } else {
28448            __tmp.len()
28449        }
28450    }
28451}
28452#[doc = "Set the vehicle attitude and body angular rates."]
28453#[doc = ""]
28454#[doc = "ID: 139"]
28455#[derive(Debug, Clone, PartialEq)]
28456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28458#[cfg_attr(feature = "ts", derive(TS))]
28459#[cfg_attr(feature = "ts", ts(export))]
28460pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28461    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28462    pub time_usec: u64,
28463    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28466    pub controls: [f32; 8],
28467    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28468    pub group_mlx: u8,
28469    #[doc = "System ID"]
28470    pub target_system: u8,
28471    #[doc = "Component ID"]
28472    pub target_component: u8,
28473}
28474impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28475    pub const ENCODED_LEN: usize = 43usize;
28476    pub const DEFAULT: Self = Self {
28477        time_usec: 0_u64,
28478        controls: [0.0_f32; 8usize],
28479        group_mlx: 0_u8,
28480        target_system: 0_u8,
28481        target_component: 0_u8,
28482    };
28483    #[cfg(feature = "arbitrary")]
28484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28485        use arbitrary::{Arbitrary, Unstructured};
28486        let mut buf = [0u8; 1024];
28487        rng.fill_bytes(&mut buf);
28488        let mut unstructured = Unstructured::new(&buf);
28489        Self::arbitrary(&mut unstructured).unwrap_or_default()
28490    }
28491}
28492impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28493    fn default() -> Self {
28494        Self::DEFAULT.clone()
28495    }
28496}
28497impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28498    type Message = MavMessage;
28499    const ID: u32 = 139u32;
28500    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28501    const EXTRA_CRC: u8 = 168u8;
28502    const ENCODED_LEN: usize = 43usize;
28503    fn deser(
28504        _version: MavlinkVersion,
28505        __input: &[u8],
28506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28507        let avail_len = __input.len();
28508        let mut payload_buf = [0; Self::ENCODED_LEN];
28509        let mut buf = if avail_len < Self::ENCODED_LEN {
28510            payload_buf[0..avail_len].copy_from_slice(__input);
28511            Bytes::new(&payload_buf)
28512        } else {
28513            Bytes::new(__input)
28514        };
28515        let mut __struct = Self::default();
28516        __struct.time_usec = buf.get_u64_le();
28517        for v in &mut __struct.controls {
28518            let val = buf.get_f32_le();
28519            *v = val;
28520        }
28521        __struct.group_mlx = buf.get_u8();
28522        __struct.target_system = buf.get_u8();
28523        __struct.target_component = buf.get_u8();
28524        Ok(__struct)
28525    }
28526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28527        let mut __tmp = BytesMut::new(bytes);
28528        #[allow(clippy::absurd_extreme_comparisons)]
28529        #[allow(unused_comparisons)]
28530        if __tmp.remaining() < Self::ENCODED_LEN {
28531            panic!(
28532                "buffer is too small (need {} bytes, but got {})",
28533                Self::ENCODED_LEN,
28534                __tmp.remaining(),
28535            )
28536        }
28537        __tmp.put_u64_le(self.time_usec);
28538        for val in &self.controls {
28539            __tmp.put_f32_le(*val);
28540        }
28541        __tmp.put_u8(self.group_mlx);
28542        __tmp.put_u8(self.target_system);
28543        __tmp.put_u8(self.target_component);
28544        if matches!(version, MavlinkVersion::V2) {
28545            let len = __tmp.len();
28546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28547        } else {
28548            __tmp.len()
28549        }
28550    }
28551}
28552#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28553#[doc = ""]
28554#[doc = "ID: 82"]
28555#[derive(Debug, Clone, PartialEq)]
28556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28558#[cfg_attr(feature = "ts", derive(TS))]
28559#[cfg_attr(feature = "ts", ts(export))]
28560pub struct SET_ATTITUDE_TARGET_DATA {
28561    #[doc = "Timestamp (time since system boot)."]
28562    pub time_boot_ms: u32,
28563    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28564    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28565    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28566    pub q: [f32; 4],
28567    #[doc = "Body roll rate"]
28568    pub body_roll_rate: f32,
28569    #[doc = "Body pitch rate"]
28570    pub body_pitch_rate: f32,
28571    #[doc = "Body yaw rate"]
28572    pub body_yaw_rate: f32,
28573    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28574    pub thrust: f32,
28575    #[doc = "System ID"]
28576    pub target_system: u8,
28577    #[doc = "Component ID"]
28578    pub target_component: u8,
28579    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28580    pub type_mask: AttitudeTargetTypemask,
28581    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28582    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28584    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28585    pub thrust_body: [f32; 3],
28586}
28587impl SET_ATTITUDE_TARGET_DATA {
28588    pub const ENCODED_LEN: usize = 51usize;
28589    pub const DEFAULT: Self = Self {
28590        time_boot_ms: 0_u32,
28591        q: [0.0_f32; 4usize],
28592        body_roll_rate: 0.0_f32,
28593        body_pitch_rate: 0.0_f32,
28594        body_yaw_rate: 0.0_f32,
28595        thrust: 0.0_f32,
28596        target_system: 0_u8,
28597        target_component: 0_u8,
28598        type_mask: AttitudeTargetTypemask::DEFAULT,
28599        thrust_body: [0.0_f32; 3usize],
28600    };
28601    #[cfg(feature = "arbitrary")]
28602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28603        use arbitrary::{Arbitrary, Unstructured};
28604        let mut buf = [0u8; 1024];
28605        rng.fill_bytes(&mut buf);
28606        let mut unstructured = Unstructured::new(&buf);
28607        Self::arbitrary(&mut unstructured).unwrap_or_default()
28608    }
28609}
28610impl Default for SET_ATTITUDE_TARGET_DATA {
28611    fn default() -> Self {
28612        Self::DEFAULT.clone()
28613    }
28614}
28615impl MessageData for SET_ATTITUDE_TARGET_DATA {
28616    type Message = MavMessage;
28617    const ID: u32 = 82u32;
28618    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28619    const EXTRA_CRC: u8 = 49u8;
28620    const ENCODED_LEN: usize = 51usize;
28621    fn deser(
28622        _version: MavlinkVersion,
28623        __input: &[u8],
28624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28625        let avail_len = __input.len();
28626        let mut payload_buf = [0; Self::ENCODED_LEN];
28627        let mut buf = if avail_len < Self::ENCODED_LEN {
28628            payload_buf[0..avail_len].copy_from_slice(__input);
28629            Bytes::new(&payload_buf)
28630        } else {
28631            Bytes::new(__input)
28632        };
28633        let mut __struct = Self::default();
28634        __struct.time_boot_ms = buf.get_u32_le();
28635        for v in &mut __struct.q {
28636            let val = buf.get_f32_le();
28637            *v = val;
28638        }
28639        __struct.body_roll_rate = buf.get_f32_le();
28640        __struct.body_pitch_rate = buf.get_f32_le();
28641        __struct.body_yaw_rate = buf.get_f32_le();
28642        __struct.thrust = buf.get_f32_le();
28643        __struct.target_system = buf.get_u8();
28644        __struct.target_component = buf.get_u8();
28645        let tmp = buf.get_u8();
28646        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
28647            ::mavlink_core::error::ParserError::InvalidFlag {
28648                flag_type: "AttitudeTargetTypemask",
28649                value: tmp as u64,
28650            },
28651        )?;
28652        for v in &mut __struct.thrust_body {
28653            let val = buf.get_f32_le();
28654            *v = val;
28655        }
28656        Ok(__struct)
28657    }
28658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28659        let mut __tmp = BytesMut::new(bytes);
28660        #[allow(clippy::absurd_extreme_comparisons)]
28661        #[allow(unused_comparisons)]
28662        if __tmp.remaining() < Self::ENCODED_LEN {
28663            panic!(
28664                "buffer is too small (need {} bytes, but got {})",
28665                Self::ENCODED_LEN,
28666                __tmp.remaining(),
28667            )
28668        }
28669        __tmp.put_u32_le(self.time_boot_ms);
28670        for val in &self.q {
28671            __tmp.put_f32_le(*val);
28672        }
28673        __tmp.put_f32_le(self.body_roll_rate);
28674        __tmp.put_f32_le(self.body_pitch_rate);
28675        __tmp.put_f32_le(self.body_yaw_rate);
28676        __tmp.put_f32_le(self.thrust);
28677        __tmp.put_u8(self.target_system);
28678        __tmp.put_u8(self.target_component);
28679        __tmp.put_u8(self.type_mask.bits());
28680        if matches!(version, MavlinkVersion::V2) {
28681            for val in &self.thrust_body {
28682                __tmp.put_f32_le(*val);
28683            }
28684            let len = __tmp.len();
28685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28686        } else {
28687            __tmp.len()
28688        }
28689    }
28690}
28691#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28692#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28693#[doc = ""]
28694#[doc = "ID: 48"]
28695#[derive(Debug, Clone, PartialEq)]
28696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28698#[cfg_attr(feature = "ts", derive(TS))]
28699#[cfg_attr(feature = "ts", ts(export))]
28700pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28701    #[doc = "Latitude (WGS84)"]
28702    pub latitude: i32,
28703    #[doc = "Longitude (WGS84)"]
28704    pub longitude: i32,
28705    #[doc = "Altitude (MSL). Positive for up."]
28706    pub altitude: i32,
28707    #[doc = "System ID"]
28708    pub target_system: u8,
28709    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28710    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28711    pub time_usec: u64,
28712}
28713impl SET_GPS_GLOBAL_ORIGIN_DATA {
28714    pub const ENCODED_LEN: usize = 21usize;
28715    pub const DEFAULT: Self = Self {
28716        latitude: 0_i32,
28717        longitude: 0_i32,
28718        altitude: 0_i32,
28719        target_system: 0_u8,
28720        time_usec: 0_u64,
28721    };
28722    #[cfg(feature = "arbitrary")]
28723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28724        use arbitrary::{Arbitrary, Unstructured};
28725        let mut buf = [0u8; 1024];
28726        rng.fill_bytes(&mut buf);
28727        let mut unstructured = Unstructured::new(&buf);
28728        Self::arbitrary(&mut unstructured).unwrap_or_default()
28729    }
28730}
28731impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28732    fn default() -> Self {
28733        Self::DEFAULT.clone()
28734    }
28735}
28736impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28737    type Message = MavMessage;
28738    const ID: u32 = 48u32;
28739    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28740    const EXTRA_CRC: u8 = 41u8;
28741    const ENCODED_LEN: usize = 21usize;
28742    fn deser(
28743        _version: MavlinkVersion,
28744        __input: &[u8],
28745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28746        let avail_len = __input.len();
28747        let mut payload_buf = [0; Self::ENCODED_LEN];
28748        let mut buf = if avail_len < Self::ENCODED_LEN {
28749            payload_buf[0..avail_len].copy_from_slice(__input);
28750            Bytes::new(&payload_buf)
28751        } else {
28752            Bytes::new(__input)
28753        };
28754        let mut __struct = Self::default();
28755        __struct.latitude = buf.get_i32_le();
28756        __struct.longitude = buf.get_i32_le();
28757        __struct.altitude = buf.get_i32_le();
28758        __struct.target_system = buf.get_u8();
28759        __struct.time_usec = buf.get_u64_le();
28760        Ok(__struct)
28761    }
28762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28763        let mut __tmp = BytesMut::new(bytes);
28764        #[allow(clippy::absurd_extreme_comparisons)]
28765        #[allow(unused_comparisons)]
28766        if __tmp.remaining() < Self::ENCODED_LEN {
28767            panic!(
28768                "buffer is too small (need {} bytes, but got {})",
28769                Self::ENCODED_LEN,
28770                __tmp.remaining(),
28771            )
28772        }
28773        __tmp.put_i32_le(self.latitude);
28774        __tmp.put_i32_le(self.longitude);
28775        __tmp.put_i32_le(self.altitude);
28776        __tmp.put_u8(self.target_system);
28777        if matches!(version, MavlinkVersion::V2) {
28778            __tmp.put_u64_le(self.time_usec);
28779            let len = __tmp.len();
28780            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28781        } else {
28782            __tmp.len()
28783        }
28784    }
28785}
28786#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28787#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28788#[doc = ""]
28789#[doc = "ID: 243"]
28790#[derive(Debug, Clone, PartialEq)]
28791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28793#[cfg_attr(feature = "ts", derive(TS))]
28794#[cfg_attr(feature = "ts", ts(export))]
28795pub struct SET_HOME_POSITION_DATA {
28796    #[doc = "Latitude (WGS84)"]
28797    pub latitude: i32,
28798    #[doc = "Longitude (WGS84)"]
28799    pub longitude: i32,
28800    #[doc = "Altitude (MSL). Positive for up."]
28801    pub altitude: i32,
28802    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28803    pub x: f32,
28804    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28805    pub y: f32,
28806    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28807    pub z: f32,
28808    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28809    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28810    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28811    pub q: [f32; 4],
28812    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28813    pub approach_x: f32,
28814    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28815    pub approach_y: f32,
28816    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28817    pub approach_z: f32,
28818    #[doc = "System ID."]
28819    pub target_system: u8,
28820    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28822    pub time_usec: u64,
28823}
28824impl SET_HOME_POSITION_DATA {
28825    pub const ENCODED_LEN: usize = 61usize;
28826    pub const DEFAULT: Self = Self {
28827        latitude: 0_i32,
28828        longitude: 0_i32,
28829        altitude: 0_i32,
28830        x: 0.0_f32,
28831        y: 0.0_f32,
28832        z: 0.0_f32,
28833        q: [0.0_f32; 4usize],
28834        approach_x: 0.0_f32,
28835        approach_y: 0.0_f32,
28836        approach_z: 0.0_f32,
28837        target_system: 0_u8,
28838        time_usec: 0_u64,
28839    };
28840    #[cfg(feature = "arbitrary")]
28841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28842        use arbitrary::{Arbitrary, Unstructured};
28843        let mut buf = [0u8; 1024];
28844        rng.fill_bytes(&mut buf);
28845        let mut unstructured = Unstructured::new(&buf);
28846        Self::arbitrary(&mut unstructured).unwrap_or_default()
28847    }
28848}
28849impl Default for SET_HOME_POSITION_DATA {
28850    fn default() -> Self {
28851        Self::DEFAULT.clone()
28852    }
28853}
28854impl MessageData for SET_HOME_POSITION_DATA {
28855    type Message = MavMessage;
28856    const ID: u32 = 243u32;
28857    const NAME: &'static str = "SET_HOME_POSITION";
28858    const EXTRA_CRC: u8 = 85u8;
28859    const ENCODED_LEN: usize = 61usize;
28860    fn deser(
28861        _version: MavlinkVersion,
28862        __input: &[u8],
28863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28864        let avail_len = __input.len();
28865        let mut payload_buf = [0; Self::ENCODED_LEN];
28866        let mut buf = if avail_len < Self::ENCODED_LEN {
28867            payload_buf[0..avail_len].copy_from_slice(__input);
28868            Bytes::new(&payload_buf)
28869        } else {
28870            Bytes::new(__input)
28871        };
28872        let mut __struct = Self::default();
28873        __struct.latitude = buf.get_i32_le();
28874        __struct.longitude = buf.get_i32_le();
28875        __struct.altitude = buf.get_i32_le();
28876        __struct.x = buf.get_f32_le();
28877        __struct.y = buf.get_f32_le();
28878        __struct.z = buf.get_f32_le();
28879        for v in &mut __struct.q {
28880            let val = buf.get_f32_le();
28881            *v = val;
28882        }
28883        __struct.approach_x = buf.get_f32_le();
28884        __struct.approach_y = buf.get_f32_le();
28885        __struct.approach_z = buf.get_f32_le();
28886        __struct.target_system = buf.get_u8();
28887        __struct.time_usec = buf.get_u64_le();
28888        Ok(__struct)
28889    }
28890    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28891        let mut __tmp = BytesMut::new(bytes);
28892        #[allow(clippy::absurd_extreme_comparisons)]
28893        #[allow(unused_comparisons)]
28894        if __tmp.remaining() < Self::ENCODED_LEN {
28895            panic!(
28896                "buffer is too small (need {} bytes, but got {})",
28897                Self::ENCODED_LEN,
28898                __tmp.remaining(),
28899            )
28900        }
28901        __tmp.put_i32_le(self.latitude);
28902        __tmp.put_i32_le(self.longitude);
28903        __tmp.put_i32_le(self.altitude);
28904        __tmp.put_f32_le(self.x);
28905        __tmp.put_f32_le(self.y);
28906        __tmp.put_f32_le(self.z);
28907        for val in &self.q {
28908            __tmp.put_f32_le(*val);
28909        }
28910        __tmp.put_f32_le(self.approach_x);
28911        __tmp.put_f32_le(self.approach_y);
28912        __tmp.put_f32_le(self.approach_z);
28913        __tmp.put_u8(self.target_system);
28914        if matches!(version, MavlinkVersion::V2) {
28915            __tmp.put_u64_le(self.time_usec);
28916            let len = __tmp.len();
28917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28918        } else {
28919            __tmp.len()
28920        }
28921    }
28922}
28923#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28924#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28925#[doc = ""]
28926#[doc = "ID: 11"]
28927#[derive(Debug, Clone, PartialEq)]
28928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28929#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28930#[cfg_attr(feature = "ts", derive(TS))]
28931#[cfg_attr(feature = "ts", ts(export))]
28932pub struct SET_MODE_DATA {
28933    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28934    pub custom_mode: u32,
28935    #[doc = "The system setting the mode"]
28936    pub target_system: u8,
28937    #[doc = "The new base mode."]
28938    pub base_mode: MavMode,
28939}
28940impl SET_MODE_DATA {
28941    pub const ENCODED_LEN: usize = 6usize;
28942    pub const DEFAULT: Self = Self {
28943        custom_mode: 0_u32,
28944        target_system: 0_u8,
28945        base_mode: MavMode::DEFAULT,
28946    };
28947    #[cfg(feature = "arbitrary")]
28948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28949        use arbitrary::{Arbitrary, Unstructured};
28950        let mut buf = [0u8; 1024];
28951        rng.fill_bytes(&mut buf);
28952        let mut unstructured = Unstructured::new(&buf);
28953        Self::arbitrary(&mut unstructured).unwrap_or_default()
28954    }
28955}
28956impl Default for SET_MODE_DATA {
28957    fn default() -> Self {
28958        Self::DEFAULT.clone()
28959    }
28960}
28961impl MessageData for SET_MODE_DATA {
28962    type Message = MavMessage;
28963    const ID: u32 = 11u32;
28964    const NAME: &'static str = "SET_MODE";
28965    const EXTRA_CRC: u8 = 89u8;
28966    const ENCODED_LEN: usize = 6usize;
28967    fn deser(
28968        _version: MavlinkVersion,
28969        __input: &[u8],
28970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28971        let avail_len = __input.len();
28972        let mut payload_buf = [0; Self::ENCODED_LEN];
28973        let mut buf = if avail_len < Self::ENCODED_LEN {
28974            payload_buf[0..avail_len].copy_from_slice(__input);
28975            Bytes::new(&payload_buf)
28976        } else {
28977            Bytes::new(__input)
28978        };
28979        let mut __struct = Self::default();
28980        __struct.custom_mode = buf.get_u32_le();
28981        __struct.target_system = buf.get_u8();
28982        let tmp = buf.get_u8();
28983        __struct.base_mode =
28984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28985                enum_type: "MavMode",
28986                value: tmp as u64,
28987            })?;
28988        Ok(__struct)
28989    }
28990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28991        let mut __tmp = BytesMut::new(bytes);
28992        #[allow(clippy::absurd_extreme_comparisons)]
28993        #[allow(unused_comparisons)]
28994        if __tmp.remaining() < Self::ENCODED_LEN {
28995            panic!(
28996                "buffer is too small (need {} bytes, but got {})",
28997                Self::ENCODED_LEN,
28998                __tmp.remaining(),
28999            )
29000        }
29001        __tmp.put_u32_le(self.custom_mode);
29002        __tmp.put_u8(self.target_system);
29003        __tmp.put_u8(self.base_mode as u8);
29004        if matches!(version, MavlinkVersion::V2) {
29005            let len = __tmp.len();
29006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29007        } else {
29008            __tmp.len()
29009        }
29010    }
29011}
29012#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29013#[doc = ""]
29014#[doc = "ID: 86"]
29015#[derive(Debug, Clone, PartialEq)]
29016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29018#[cfg_attr(feature = "ts", derive(TS))]
29019#[cfg_attr(feature = "ts", ts(export))]
29020pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29021    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29022    pub time_boot_ms: u32,
29023    #[doc = "Latitude in WGS84 frame"]
29024    pub lat_int: i32,
29025    #[doc = "Longitude in WGS84 frame"]
29026    pub lon_int: i32,
29027    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29028    pub alt: f32,
29029    #[doc = "X velocity in NED frame"]
29030    pub vx: f32,
29031    #[doc = "Y velocity in NED frame"]
29032    pub vy: f32,
29033    #[doc = "Z velocity in NED frame"]
29034    pub vz: f32,
29035    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29036    pub afx: f32,
29037    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29038    pub afy: f32,
29039    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29040    pub afz: f32,
29041    #[doc = "yaw setpoint"]
29042    pub yaw: f32,
29043    #[doc = "yaw rate setpoint"]
29044    pub yaw_rate: f32,
29045    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29046    pub type_mask: PositionTargetTypemask,
29047    #[doc = "System ID"]
29048    pub target_system: u8,
29049    #[doc = "Component ID"]
29050    pub target_component: u8,
29051    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29052    pub coordinate_frame: MavFrame,
29053}
29054impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29055    pub const ENCODED_LEN: usize = 53usize;
29056    pub const DEFAULT: Self = Self {
29057        time_boot_ms: 0_u32,
29058        lat_int: 0_i32,
29059        lon_int: 0_i32,
29060        alt: 0.0_f32,
29061        vx: 0.0_f32,
29062        vy: 0.0_f32,
29063        vz: 0.0_f32,
29064        afx: 0.0_f32,
29065        afy: 0.0_f32,
29066        afz: 0.0_f32,
29067        yaw: 0.0_f32,
29068        yaw_rate: 0.0_f32,
29069        type_mask: PositionTargetTypemask::DEFAULT,
29070        target_system: 0_u8,
29071        target_component: 0_u8,
29072        coordinate_frame: MavFrame::DEFAULT,
29073    };
29074    #[cfg(feature = "arbitrary")]
29075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29076        use arbitrary::{Arbitrary, Unstructured};
29077        let mut buf = [0u8; 1024];
29078        rng.fill_bytes(&mut buf);
29079        let mut unstructured = Unstructured::new(&buf);
29080        Self::arbitrary(&mut unstructured).unwrap_or_default()
29081    }
29082}
29083impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29084    fn default() -> Self {
29085        Self::DEFAULT.clone()
29086    }
29087}
29088impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29089    type Message = MavMessage;
29090    const ID: u32 = 86u32;
29091    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29092    const EXTRA_CRC: u8 = 5u8;
29093    const ENCODED_LEN: usize = 53usize;
29094    fn deser(
29095        _version: MavlinkVersion,
29096        __input: &[u8],
29097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29098        let avail_len = __input.len();
29099        let mut payload_buf = [0; Self::ENCODED_LEN];
29100        let mut buf = if avail_len < Self::ENCODED_LEN {
29101            payload_buf[0..avail_len].copy_from_slice(__input);
29102            Bytes::new(&payload_buf)
29103        } else {
29104            Bytes::new(__input)
29105        };
29106        let mut __struct = Self::default();
29107        __struct.time_boot_ms = buf.get_u32_le();
29108        __struct.lat_int = buf.get_i32_le();
29109        __struct.lon_int = buf.get_i32_le();
29110        __struct.alt = buf.get_f32_le();
29111        __struct.vx = buf.get_f32_le();
29112        __struct.vy = buf.get_f32_le();
29113        __struct.vz = buf.get_f32_le();
29114        __struct.afx = buf.get_f32_le();
29115        __struct.afy = buf.get_f32_le();
29116        __struct.afz = buf.get_f32_le();
29117        __struct.yaw = buf.get_f32_le();
29118        __struct.yaw_rate = buf.get_f32_le();
29119        let tmp = buf.get_u16_le();
29120        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
29121            ::mavlink_core::error::ParserError::InvalidFlag {
29122                flag_type: "PositionTargetTypemask",
29123                value: tmp as u64,
29124            },
29125        )?;
29126        __struct.target_system = buf.get_u8();
29127        __struct.target_component = buf.get_u8();
29128        let tmp = buf.get_u8();
29129        __struct.coordinate_frame =
29130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29131                enum_type: "MavFrame",
29132                value: tmp as u64,
29133            })?;
29134        Ok(__struct)
29135    }
29136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29137        let mut __tmp = BytesMut::new(bytes);
29138        #[allow(clippy::absurd_extreme_comparisons)]
29139        #[allow(unused_comparisons)]
29140        if __tmp.remaining() < Self::ENCODED_LEN {
29141            panic!(
29142                "buffer is too small (need {} bytes, but got {})",
29143                Self::ENCODED_LEN,
29144                __tmp.remaining(),
29145            )
29146        }
29147        __tmp.put_u32_le(self.time_boot_ms);
29148        __tmp.put_i32_le(self.lat_int);
29149        __tmp.put_i32_le(self.lon_int);
29150        __tmp.put_f32_le(self.alt);
29151        __tmp.put_f32_le(self.vx);
29152        __tmp.put_f32_le(self.vy);
29153        __tmp.put_f32_le(self.vz);
29154        __tmp.put_f32_le(self.afx);
29155        __tmp.put_f32_le(self.afy);
29156        __tmp.put_f32_le(self.afz);
29157        __tmp.put_f32_le(self.yaw);
29158        __tmp.put_f32_le(self.yaw_rate);
29159        __tmp.put_u16_le(self.type_mask.bits());
29160        __tmp.put_u8(self.target_system);
29161        __tmp.put_u8(self.target_component);
29162        __tmp.put_u8(self.coordinate_frame as u8);
29163        if matches!(version, MavlinkVersion::V2) {
29164            let len = __tmp.len();
29165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29166        } else {
29167            __tmp.len()
29168        }
29169    }
29170}
29171#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29172#[doc = ""]
29173#[doc = "ID: 84"]
29174#[derive(Debug, Clone, PartialEq)]
29175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29177#[cfg_attr(feature = "ts", derive(TS))]
29178#[cfg_attr(feature = "ts", ts(export))]
29179pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29180    #[doc = "Timestamp (time since system boot)."]
29181    pub time_boot_ms: u32,
29182    #[doc = "X Position in NED frame"]
29183    pub x: f32,
29184    #[doc = "Y Position in NED frame"]
29185    pub y: f32,
29186    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29187    pub z: f32,
29188    #[doc = "X velocity in NED frame"]
29189    pub vx: f32,
29190    #[doc = "Y velocity in NED frame"]
29191    pub vy: f32,
29192    #[doc = "Z velocity in NED frame"]
29193    pub vz: f32,
29194    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29195    pub afx: f32,
29196    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29197    pub afy: f32,
29198    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29199    pub afz: f32,
29200    #[doc = "yaw setpoint"]
29201    pub yaw: f32,
29202    #[doc = "yaw rate setpoint"]
29203    pub yaw_rate: f32,
29204    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29205    pub type_mask: PositionTargetTypemask,
29206    #[doc = "System ID"]
29207    pub target_system: u8,
29208    #[doc = "Component ID"]
29209    pub target_component: u8,
29210    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29211    pub coordinate_frame: MavFrame,
29212}
29213impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29214    pub const ENCODED_LEN: usize = 53usize;
29215    pub const DEFAULT: Self = Self {
29216        time_boot_ms: 0_u32,
29217        x: 0.0_f32,
29218        y: 0.0_f32,
29219        z: 0.0_f32,
29220        vx: 0.0_f32,
29221        vy: 0.0_f32,
29222        vz: 0.0_f32,
29223        afx: 0.0_f32,
29224        afy: 0.0_f32,
29225        afz: 0.0_f32,
29226        yaw: 0.0_f32,
29227        yaw_rate: 0.0_f32,
29228        type_mask: PositionTargetTypemask::DEFAULT,
29229        target_system: 0_u8,
29230        target_component: 0_u8,
29231        coordinate_frame: MavFrame::DEFAULT,
29232    };
29233    #[cfg(feature = "arbitrary")]
29234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29235        use arbitrary::{Arbitrary, Unstructured};
29236        let mut buf = [0u8; 1024];
29237        rng.fill_bytes(&mut buf);
29238        let mut unstructured = Unstructured::new(&buf);
29239        Self::arbitrary(&mut unstructured).unwrap_or_default()
29240    }
29241}
29242impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29243    fn default() -> Self {
29244        Self::DEFAULT.clone()
29245    }
29246}
29247impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29248    type Message = MavMessage;
29249    const ID: u32 = 84u32;
29250    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29251    const EXTRA_CRC: u8 = 143u8;
29252    const ENCODED_LEN: usize = 53usize;
29253    fn deser(
29254        _version: MavlinkVersion,
29255        __input: &[u8],
29256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29257        let avail_len = __input.len();
29258        let mut payload_buf = [0; Self::ENCODED_LEN];
29259        let mut buf = if avail_len < Self::ENCODED_LEN {
29260            payload_buf[0..avail_len].copy_from_slice(__input);
29261            Bytes::new(&payload_buf)
29262        } else {
29263            Bytes::new(__input)
29264        };
29265        let mut __struct = Self::default();
29266        __struct.time_boot_ms = buf.get_u32_le();
29267        __struct.x = buf.get_f32_le();
29268        __struct.y = buf.get_f32_le();
29269        __struct.z = buf.get_f32_le();
29270        __struct.vx = buf.get_f32_le();
29271        __struct.vy = buf.get_f32_le();
29272        __struct.vz = buf.get_f32_le();
29273        __struct.afx = buf.get_f32_le();
29274        __struct.afy = buf.get_f32_le();
29275        __struct.afz = buf.get_f32_le();
29276        __struct.yaw = buf.get_f32_le();
29277        __struct.yaw_rate = buf.get_f32_le();
29278        let tmp = buf.get_u16_le();
29279        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
29280            ::mavlink_core::error::ParserError::InvalidFlag {
29281                flag_type: "PositionTargetTypemask",
29282                value: tmp as u64,
29283            },
29284        )?;
29285        __struct.target_system = buf.get_u8();
29286        __struct.target_component = buf.get_u8();
29287        let tmp = buf.get_u8();
29288        __struct.coordinate_frame =
29289            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29290                enum_type: "MavFrame",
29291                value: tmp as u64,
29292            })?;
29293        Ok(__struct)
29294    }
29295    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29296        let mut __tmp = BytesMut::new(bytes);
29297        #[allow(clippy::absurd_extreme_comparisons)]
29298        #[allow(unused_comparisons)]
29299        if __tmp.remaining() < Self::ENCODED_LEN {
29300            panic!(
29301                "buffer is too small (need {} bytes, but got {})",
29302                Self::ENCODED_LEN,
29303                __tmp.remaining(),
29304            )
29305        }
29306        __tmp.put_u32_le(self.time_boot_ms);
29307        __tmp.put_f32_le(self.x);
29308        __tmp.put_f32_le(self.y);
29309        __tmp.put_f32_le(self.z);
29310        __tmp.put_f32_le(self.vx);
29311        __tmp.put_f32_le(self.vy);
29312        __tmp.put_f32_le(self.vz);
29313        __tmp.put_f32_le(self.afx);
29314        __tmp.put_f32_le(self.afy);
29315        __tmp.put_f32_le(self.afz);
29316        __tmp.put_f32_le(self.yaw);
29317        __tmp.put_f32_le(self.yaw_rate);
29318        __tmp.put_u16_le(self.type_mask.bits());
29319        __tmp.put_u8(self.target_system);
29320        __tmp.put_u8(self.target_component);
29321        __tmp.put_u8(self.coordinate_frame as u8);
29322        if matches!(version, MavlinkVersion::V2) {
29323            let len = __tmp.len();
29324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29325        } else {
29326            __tmp.len()
29327        }
29328    }
29329}
29330#[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
29331#[doc = ""]
29332#[doc = "ID: 354"]
29333#[derive(Debug, Clone, PartialEq)]
29334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29336#[cfg_attr(feature = "ts", derive(TS))]
29337#[cfg_attr(feature = "ts", ts(export))]
29338pub struct SET_VELOCITY_LIMITS_DATA {
29339    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29340    pub horizontal_speed_limit: f32,
29341    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29342    pub vertical_speed_limit: f32,
29343    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore)"]
29344    pub yaw_rate_limit: f32,
29345    #[doc = "System ID (0 for broadcast)."]
29346    pub target_system: u8,
29347    #[doc = "Component ID (0 for broadcast)."]
29348    pub target_component: u8,
29349}
29350impl SET_VELOCITY_LIMITS_DATA {
29351    pub const ENCODED_LEN: usize = 14usize;
29352    pub const DEFAULT: Self = Self {
29353        horizontal_speed_limit: 0.0_f32,
29354        vertical_speed_limit: 0.0_f32,
29355        yaw_rate_limit: 0.0_f32,
29356        target_system: 0_u8,
29357        target_component: 0_u8,
29358    };
29359    #[cfg(feature = "arbitrary")]
29360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29361        use arbitrary::{Arbitrary, Unstructured};
29362        let mut buf = [0u8; 1024];
29363        rng.fill_bytes(&mut buf);
29364        let mut unstructured = Unstructured::new(&buf);
29365        Self::arbitrary(&mut unstructured).unwrap_or_default()
29366    }
29367}
29368impl Default for SET_VELOCITY_LIMITS_DATA {
29369    fn default() -> Self {
29370        Self::DEFAULT.clone()
29371    }
29372}
29373impl MessageData for SET_VELOCITY_LIMITS_DATA {
29374    type Message = MavMessage;
29375    const ID: u32 = 354u32;
29376    const NAME: &'static str = "SET_VELOCITY_LIMITS";
29377    const EXTRA_CRC: u8 = 210u8;
29378    const ENCODED_LEN: usize = 14usize;
29379    fn deser(
29380        _version: MavlinkVersion,
29381        __input: &[u8],
29382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29383        let avail_len = __input.len();
29384        let mut payload_buf = [0; Self::ENCODED_LEN];
29385        let mut buf = if avail_len < Self::ENCODED_LEN {
29386            payload_buf[0..avail_len].copy_from_slice(__input);
29387            Bytes::new(&payload_buf)
29388        } else {
29389            Bytes::new(__input)
29390        };
29391        let mut __struct = Self::default();
29392        __struct.horizontal_speed_limit = buf.get_f32_le();
29393        __struct.vertical_speed_limit = buf.get_f32_le();
29394        __struct.yaw_rate_limit = buf.get_f32_le();
29395        __struct.target_system = buf.get_u8();
29396        __struct.target_component = buf.get_u8();
29397        Ok(__struct)
29398    }
29399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29400        let mut __tmp = BytesMut::new(bytes);
29401        #[allow(clippy::absurd_extreme_comparisons)]
29402        #[allow(unused_comparisons)]
29403        if __tmp.remaining() < Self::ENCODED_LEN {
29404            panic!(
29405                "buffer is too small (need {} bytes, but got {})",
29406                Self::ENCODED_LEN,
29407                __tmp.remaining(),
29408            )
29409        }
29410        __tmp.put_f32_le(self.horizontal_speed_limit);
29411        __tmp.put_f32_le(self.vertical_speed_limit);
29412        __tmp.put_f32_le(self.yaw_rate_limit);
29413        __tmp.put_u8(self.target_system);
29414        __tmp.put_u8(self.target_component);
29415        if matches!(version, MavlinkVersion::V2) {
29416            let len = __tmp.len();
29417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29418        } else {
29419            __tmp.len()
29420        }
29421    }
29422}
29423#[doc = "Status of simulation environment, if used."]
29424#[doc = ""]
29425#[doc = "ID: 108"]
29426#[derive(Debug, Clone, PartialEq)]
29427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29429#[cfg_attr(feature = "ts", derive(TS))]
29430#[cfg_attr(feature = "ts", ts(export))]
29431pub struct SIM_STATE_DATA {
29432    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29433    pub q1: f32,
29434    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29435    pub q2: f32,
29436    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29437    pub q3: f32,
29438    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29439    pub q4: f32,
29440    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29441    pub roll: f32,
29442    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29443    pub pitch: f32,
29444    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29445    pub yaw: f32,
29446    #[doc = "X acceleration"]
29447    pub xacc: f32,
29448    #[doc = "Y acceleration"]
29449    pub yacc: f32,
29450    #[doc = "Z acceleration"]
29451    pub zacc: f32,
29452    #[doc = "Angular speed around X axis"]
29453    pub xgyro: f32,
29454    #[doc = "Angular speed around Y axis"]
29455    pub ygyro: f32,
29456    #[doc = "Angular speed around Z axis"]
29457    pub zgyro: f32,
29458    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29459    pub lat: f32,
29460    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29461    pub lon: f32,
29462    #[doc = "Altitude"]
29463    pub alt: f32,
29464    #[doc = "Horizontal position standard deviation"]
29465    pub std_dev_horz: f32,
29466    #[doc = "Vertical position standard deviation"]
29467    pub std_dev_vert: f32,
29468    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29469    pub vn: f32,
29470    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29471    pub ve: f32,
29472    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29473    pub vd: f32,
29474    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29476    pub lat_int: i32,
29477    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29479    pub lon_int: i32,
29480}
29481impl SIM_STATE_DATA {
29482    pub const ENCODED_LEN: usize = 92usize;
29483    pub const DEFAULT: Self = Self {
29484        q1: 0.0_f32,
29485        q2: 0.0_f32,
29486        q3: 0.0_f32,
29487        q4: 0.0_f32,
29488        roll: 0.0_f32,
29489        pitch: 0.0_f32,
29490        yaw: 0.0_f32,
29491        xacc: 0.0_f32,
29492        yacc: 0.0_f32,
29493        zacc: 0.0_f32,
29494        xgyro: 0.0_f32,
29495        ygyro: 0.0_f32,
29496        zgyro: 0.0_f32,
29497        lat: 0.0_f32,
29498        lon: 0.0_f32,
29499        alt: 0.0_f32,
29500        std_dev_horz: 0.0_f32,
29501        std_dev_vert: 0.0_f32,
29502        vn: 0.0_f32,
29503        ve: 0.0_f32,
29504        vd: 0.0_f32,
29505        lat_int: 0_i32,
29506        lon_int: 0_i32,
29507    };
29508    #[cfg(feature = "arbitrary")]
29509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29510        use arbitrary::{Arbitrary, Unstructured};
29511        let mut buf = [0u8; 1024];
29512        rng.fill_bytes(&mut buf);
29513        let mut unstructured = Unstructured::new(&buf);
29514        Self::arbitrary(&mut unstructured).unwrap_or_default()
29515    }
29516}
29517impl Default for SIM_STATE_DATA {
29518    fn default() -> Self {
29519        Self::DEFAULT.clone()
29520    }
29521}
29522impl MessageData for SIM_STATE_DATA {
29523    type Message = MavMessage;
29524    const ID: u32 = 108u32;
29525    const NAME: &'static str = "SIM_STATE";
29526    const EXTRA_CRC: u8 = 32u8;
29527    const ENCODED_LEN: usize = 92usize;
29528    fn deser(
29529        _version: MavlinkVersion,
29530        __input: &[u8],
29531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29532        let avail_len = __input.len();
29533        let mut payload_buf = [0; Self::ENCODED_LEN];
29534        let mut buf = if avail_len < Self::ENCODED_LEN {
29535            payload_buf[0..avail_len].copy_from_slice(__input);
29536            Bytes::new(&payload_buf)
29537        } else {
29538            Bytes::new(__input)
29539        };
29540        let mut __struct = Self::default();
29541        __struct.q1 = buf.get_f32_le();
29542        __struct.q2 = buf.get_f32_le();
29543        __struct.q3 = buf.get_f32_le();
29544        __struct.q4 = buf.get_f32_le();
29545        __struct.roll = buf.get_f32_le();
29546        __struct.pitch = buf.get_f32_le();
29547        __struct.yaw = buf.get_f32_le();
29548        __struct.xacc = buf.get_f32_le();
29549        __struct.yacc = buf.get_f32_le();
29550        __struct.zacc = buf.get_f32_le();
29551        __struct.xgyro = buf.get_f32_le();
29552        __struct.ygyro = buf.get_f32_le();
29553        __struct.zgyro = buf.get_f32_le();
29554        __struct.lat = buf.get_f32_le();
29555        __struct.lon = buf.get_f32_le();
29556        __struct.alt = buf.get_f32_le();
29557        __struct.std_dev_horz = buf.get_f32_le();
29558        __struct.std_dev_vert = buf.get_f32_le();
29559        __struct.vn = buf.get_f32_le();
29560        __struct.ve = buf.get_f32_le();
29561        __struct.vd = buf.get_f32_le();
29562        __struct.lat_int = buf.get_i32_le();
29563        __struct.lon_int = buf.get_i32_le();
29564        Ok(__struct)
29565    }
29566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29567        let mut __tmp = BytesMut::new(bytes);
29568        #[allow(clippy::absurd_extreme_comparisons)]
29569        #[allow(unused_comparisons)]
29570        if __tmp.remaining() < Self::ENCODED_LEN {
29571            panic!(
29572                "buffer is too small (need {} bytes, but got {})",
29573                Self::ENCODED_LEN,
29574                __tmp.remaining(),
29575            )
29576        }
29577        __tmp.put_f32_le(self.q1);
29578        __tmp.put_f32_le(self.q2);
29579        __tmp.put_f32_le(self.q3);
29580        __tmp.put_f32_le(self.q4);
29581        __tmp.put_f32_le(self.roll);
29582        __tmp.put_f32_le(self.pitch);
29583        __tmp.put_f32_le(self.yaw);
29584        __tmp.put_f32_le(self.xacc);
29585        __tmp.put_f32_le(self.yacc);
29586        __tmp.put_f32_le(self.zacc);
29587        __tmp.put_f32_le(self.xgyro);
29588        __tmp.put_f32_le(self.ygyro);
29589        __tmp.put_f32_le(self.zgyro);
29590        __tmp.put_f32_le(self.lat);
29591        __tmp.put_f32_le(self.lon);
29592        __tmp.put_f32_le(self.alt);
29593        __tmp.put_f32_le(self.std_dev_horz);
29594        __tmp.put_f32_le(self.std_dev_vert);
29595        __tmp.put_f32_le(self.vn);
29596        __tmp.put_f32_le(self.ve);
29597        __tmp.put_f32_le(self.vd);
29598        if matches!(version, MavlinkVersion::V2) {
29599            __tmp.put_i32_le(self.lat_int);
29600            __tmp.put_i32_le(self.lon_int);
29601            let len = __tmp.len();
29602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29603        } else {
29604            __tmp.len()
29605        }
29606    }
29607}
29608#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29609#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29610#[doc = ""]
29611#[doc = "ID: 370"]
29612#[derive(Debug, Clone, PartialEq)]
29613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29615#[cfg_attr(feature = "ts", derive(TS))]
29616#[cfg_attr(feature = "ts", ts(export))]
29617pub struct SMART_BATTERY_INFO_DATA {
29618    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29619    pub capacity_full_specification: i32,
29620    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29621    pub capacity_full: i32,
29622    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29623    pub cycle_count: u16,
29624    #[doc = "Battery weight. 0: field not provided."]
29625    pub weight: u16,
29626    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29627    pub discharge_minimum_voltage: u16,
29628    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29629    pub charging_minimum_voltage: u16,
29630    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29631    pub resting_minimum_voltage: u16,
29632    #[doc = "Battery ID"]
29633    pub id: u8,
29634    #[doc = "Function of the battery"]
29635    pub battery_function: MavBatteryFunction,
29636    #[doc = "Type (chemistry) of the battery"]
29637    pub mavtype: MavBatteryType,
29638    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29639    #[cfg_attr(feature = "ts", ts(type = "string"))]
29640    pub serial_number: CharArray<16>,
29641    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29642    #[cfg_attr(feature = "ts", ts(type = "string"))]
29643    pub device_name: CharArray<50>,
29644    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29645    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29646    pub charging_maximum_voltage: u16,
29647    #[doc = "Number of battery cells in series. 0: field not provided."]
29648    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29649    pub cells_in_series: u8,
29650    #[doc = "Maximum pack discharge current. 0: field not provided."]
29651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29652    pub discharge_maximum_current: u32,
29653    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29655    pub discharge_maximum_burst_current: u32,
29656    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29658    #[cfg_attr(feature = "ts", ts(type = "string"))]
29659    pub manufacture_date: CharArray<11>,
29660}
29661impl SMART_BATTERY_INFO_DATA {
29662    pub const ENCODED_LEN: usize = 109usize;
29663    pub const DEFAULT: Self = Self {
29664        capacity_full_specification: 0_i32,
29665        capacity_full: 0_i32,
29666        cycle_count: 0_u16,
29667        weight: 0_u16,
29668        discharge_minimum_voltage: 0_u16,
29669        charging_minimum_voltage: 0_u16,
29670        resting_minimum_voltage: 0_u16,
29671        id: 0_u8,
29672        battery_function: MavBatteryFunction::DEFAULT,
29673        mavtype: MavBatteryType::DEFAULT,
29674        serial_number: CharArray::new([0_u8; 16usize]),
29675        device_name: CharArray::new([0_u8; 50usize]),
29676        charging_maximum_voltage: 0_u16,
29677        cells_in_series: 0_u8,
29678        discharge_maximum_current: 0_u32,
29679        discharge_maximum_burst_current: 0_u32,
29680        manufacture_date: CharArray::new([0_u8; 11usize]),
29681    };
29682    #[cfg(feature = "arbitrary")]
29683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29684        use arbitrary::{Arbitrary, Unstructured};
29685        let mut buf = [0u8; 1024];
29686        rng.fill_bytes(&mut buf);
29687        let mut unstructured = Unstructured::new(&buf);
29688        Self::arbitrary(&mut unstructured).unwrap_or_default()
29689    }
29690}
29691impl Default for SMART_BATTERY_INFO_DATA {
29692    fn default() -> Self {
29693        Self::DEFAULT.clone()
29694    }
29695}
29696impl MessageData for SMART_BATTERY_INFO_DATA {
29697    type Message = MavMessage;
29698    const ID: u32 = 370u32;
29699    const NAME: &'static str = "SMART_BATTERY_INFO";
29700    const EXTRA_CRC: u8 = 75u8;
29701    const ENCODED_LEN: usize = 109usize;
29702    fn deser(
29703        _version: MavlinkVersion,
29704        __input: &[u8],
29705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29706        let avail_len = __input.len();
29707        let mut payload_buf = [0; Self::ENCODED_LEN];
29708        let mut buf = if avail_len < Self::ENCODED_LEN {
29709            payload_buf[0..avail_len].copy_from_slice(__input);
29710            Bytes::new(&payload_buf)
29711        } else {
29712            Bytes::new(__input)
29713        };
29714        let mut __struct = Self::default();
29715        __struct.capacity_full_specification = buf.get_i32_le();
29716        __struct.capacity_full = buf.get_i32_le();
29717        __struct.cycle_count = buf.get_u16_le();
29718        __struct.weight = buf.get_u16_le();
29719        __struct.discharge_minimum_voltage = buf.get_u16_le();
29720        __struct.charging_minimum_voltage = buf.get_u16_le();
29721        __struct.resting_minimum_voltage = buf.get_u16_le();
29722        __struct.id = buf.get_u8();
29723        let tmp = buf.get_u8();
29724        __struct.battery_function =
29725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29726                enum_type: "MavBatteryFunction",
29727                value: tmp as u64,
29728            })?;
29729        let tmp = buf.get_u8();
29730        __struct.mavtype =
29731            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29732                enum_type: "MavBatteryType",
29733                value: tmp as u64,
29734            })?;
29735        let mut tmp = [0_u8; 16usize];
29736        for v in &mut tmp {
29737            *v = buf.get_u8();
29738        }
29739        __struct.serial_number = CharArray::new(tmp);
29740        let mut tmp = [0_u8; 50usize];
29741        for v in &mut tmp {
29742            *v = buf.get_u8();
29743        }
29744        __struct.device_name = CharArray::new(tmp);
29745        __struct.charging_maximum_voltage = buf.get_u16_le();
29746        __struct.cells_in_series = buf.get_u8();
29747        __struct.discharge_maximum_current = buf.get_u32_le();
29748        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29749        let mut tmp = [0_u8; 11usize];
29750        for v in &mut tmp {
29751            *v = buf.get_u8();
29752        }
29753        __struct.manufacture_date = CharArray::new(tmp);
29754        Ok(__struct)
29755    }
29756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29757        let mut __tmp = BytesMut::new(bytes);
29758        #[allow(clippy::absurd_extreme_comparisons)]
29759        #[allow(unused_comparisons)]
29760        if __tmp.remaining() < Self::ENCODED_LEN {
29761            panic!(
29762                "buffer is too small (need {} bytes, but got {})",
29763                Self::ENCODED_LEN,
29764                __tmp.remaining(),
29765            )
29766        }
29767        __tmp.put_i32_le(self.capacity_full_specification);
29768        __tmp.put_i32_le(self.capacity_full);
29769        __tmp.put_u16_le(self.cycle_count);
29770        __tmp.put_u16_le(self.weight);
29771        __tmp.put_u16_le(self.discharge_minimum_voltage);
29772        __tmp.put_u16_le(self.charging_minimum_voltage);
29773        __tmp.put_u16_le(self.resting_minimum_voltage);
29774        __tmp.put_u8(self.id);
29775        __tmp.put_u8(self.battery_function as u8);
29776        __tmp.put_u8(self.mavtype as u8);
29777        for val in &self.serial_number {
29778            __tmp.put_u8(*val);
29779        }
29780        for val in &self.device_name {
29781            __tmp.put_u8(*val);
29782        }
29783        if matches!(version, MavlinkVersion::V2) {
29784            __tmp.put_u16_le(self.charging_maximum_voltage);
29785            __tmp.put_u8(self.cells_in_series);
29786            __tmp.put_u32_le(self.discharge_maximum_current);
29787            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29788            for val in &self.manufacture_date {
29789                __tmp.put_u8(*val);
29790            }
29791            let len = __tmp.len();
29792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29793        } else {
29794            __tmp.len()
29795        }
29796    }
29797}
29798#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29799#[doc = ""]
29800#[doc = "ID: 253"]
29801#[derive(Debug, Clone, PartialEq)]
29802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29804#[cfg_attr(feature = "ts", derive(TS))]
29805#[cfg_attr(feature = "ts", ts(export))]
29806pub struct STATUSTEXT_DATA {
29807    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29808    pub severity: MavSeverity,
29809    #[doc = "Status text message, without null termination character"]
29810    #[cfg_attr(feature = "ts", ts(type = "string"))]
29811    pub text: CharArray<50>,
29812    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29814    pub id: u16,
29815    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29816    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29817    pub chunk_seq: u8,
29818}
29819impl STATUSTEXT_DATA {
29820    pub const ENCODED_LEN: usize = 54usize;
29821    pub const DEFAULT: Self = Self {
29822        severity: MavSeverity::DEFAULT,
29823        text: CharArray::new([0_u8; 50usize]),
29824        id: 0_u16,
29825        chunk_seq: 0_u8,
29826    };
29827    #[cfg(feature = "arbitrary")]
29828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29829        use arbitrary::{Arbitrary, Unstructured};
29830        let mut buf = [0u8; 1024];
29831        rng.fill_bytes(&mut buf);
29832        let mut unstructured = Unstructured::new(&buf);
29833        Self::arbitrary(&mut unstructured).unwrap_or_default()
29834    }
29835}
29836impl Default for STATUSTEXT_DATA {
29837    fn default() -> Self {
29838        Self::DEFAULT.clone()
29839    }
29840}
29841impl MessageData for STATUSTEXT_DATA {
29842    type Message = MavMessage;
29843    const ID: u32 = 253u32;
29844    const NAME: &'static str = "STATUSTEXT";
29845    const EXTRA_CRC: u8 = 83u8;
29846    const ENCODED_LEN: usize = 54usize;
29847    fn deser(
29848        _version: MavlinkVersion,
29849        __input: &[u8],
29850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29851        let avail_len = __input.len();
29852        let mut payload_buf = [0; Self::ENCODED_LEN];
29853        let mut buf = if avail_len < Self::ENCODED_LEN {
29854            payload_buf[0..avail_len].copy_from_slice(__input);
29855            Bytes::new(&payload_buf)
29856        } else {
29857            Bytes::new(__input)
29858        };
29859        let mut __struct = Self::default();
29860        let tmp = buf.get_u8();
29861        __struct.severity =
29862            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29863                enum_type: "MavSeverity",
29864                value: tmp as u64,
29865            })?;
29866        let mut tmp = [0_u8; 50usize];
29867        for v in &mut tmp {
29868            *v = buf.get_u8();
29869        }
29870        __struct.text = CharArray::new(tmp);
29871        __struct.id = buf.get_u16_le();
29872        __struct.chunk_seq = buf.get_u8();
29873        Ok(__struct)
29874    }
29875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29876        let mut __tmp = BytesMut::new(bytes);
29877        #[allow(clippy::absurd_extreme_comparisons)]
29878        #[allow(unused_comparisons)]
29879        if __tmp.remaining() < Self::ENCODED_LEN {
29880            panic!(
29881                "buffer is too small (need {} bytes, but got {})",
29882                Self::ENCODED_LEN,
29883                __tmp.remaining(),
29884            )
29885        }
29886        __tmp.put_u8(self.severity as u8);
29887        for val in &self.text {
29888            __tmp.put_u8(*val);
29889        }
29890        if matches!(version, MavlinkVersion::V2) {
29891            __tmp.put_u16_le(self.id);
29892            __tmp.put_u8(self.chunk_seq);
29893            let len = __tmp.len();
29894            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29895        } else {
29896            __tmp.len()
29897        }
29898    }
29899}
29900#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29901#[doc = ""]
29902#[doc = "ID: 261"]
29903#[derive(Debug, Clone, PartialEq)]
29904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29906#[cfg_attr(feature = "ts", derive(TS))]
29907#[cfg_attr(feature = "ts", ts(export))]
29908pub struct STORAGE_INFORMATION_DATA {
29909    #[doc = "Timestamp (time since system boot)."]
29910    pub time_boot_ms: u32,
29911    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29912    pub total_capacity: f32,
29913    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29914    pub used_capacity: f32,
29915    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29916    pub available_capacity: f32,
29917    #[doc = "Read speed."]
29918    pub read_speed: f32,
29919    #[doc = "Write speed."]
29920    pub write_speed: f32,
29921    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29922    pub storage_id: u8,
29923    #[doc = "Number of storage devices"]
29924    pub storage_count: u8,
29925    #[doc = "Status of storage"]
29926    pub status: StorageStatus,
29927    #[doc = "Type of storage"]
29928    #[cfg_attr(feature = "serde", serde(default))]
29929    pub mavtype: StorageType,
29930    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29932    #[cfg_attr(feature = "ts", ts(type = "string"))]
29933    pub name: CharArray<32>,
29934    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29935    #[cfg_attr(feature = "serde", serde(default))]
29936    pub storage_usage: StorageUsageFlag,
29937}
29938impl STORAGE_INFORMATION_DATA {
29939    pub const ENCODED_LEN: usize = 61usize;
29940    pub const DEFAULT: Self = Self {
29941        time_boot_ms: 0_u32,
29942        total_capacity: 0.0_f32,
29943        used_capacity: 0.0_f32,
29944        available_capacity: 0.0_f32,
29945        read_speed: 0.0_f32,
29946        write_speed: 0.0_f32,
29947        storage_id: 0_u8,
29948        storage_count: 0_u8,
29949        status: StorageStatus::DEFAULT,
29950        mavtype: StorageType::DEFAULT,
29951        name: CharArray::new([0_u8; 32usize]),
29952        storage_usage: StorageUsageFlag::DEFAULT,
29953    };
29954    #[cfg(feature = "arbitrary")]
29955    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29956        use arbitrary::{Arbitrary, Unstructured};
29957        let mut buf = [0u8; 1024];
29958        rng.fill_bytes(&mut buf);
29959        let mut unstructured = Unstructured::new(&buf);
29960        Self::arbitrary(&mut unstructured).unwrap_or_default()
29961    }
29962}
29963impl Default for STORAGE_INFORMATION_DATA {
29964    fn default() -> Self {
29965        Self::DEFAULT.clone()
29966    }
29967}
29968impl MessageData for STORAGE_INFORMATION_DATA {
29969    type Message = MavMessage;
29970    const ID: u32 = 261u32;
29971    const NAME: &'static str = "STORAGE_INFORMATION";
29972    const EXTRA_CRC: u8 = 179u8;
29973    const ENCODED_LEN: usize = 61usize;
29974    fn deser(
29975        _version: MavlinkVersion,
29976        __input: &[u8],
29977    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29978        let avail_len = __input.len();
29979        let mut payload_buf = [0; Self::ENCODED_LEN];
29980        let mut buf = if avail_len < Self::ENCODED_LEN {
29981            payload_buf[0..avail_len].copy_from_slice(__input);
29982            Bytes::new(&payload_buf)
29983        } else {
29984            Bytes::new(__input)
29985        };
29986        let mut __struct = Self::default();
29987        __struct.time_boot_ms = buf.get_u32_le();
29988        __struct.total_capacity = buf.get_f32_le();
29989        __struct.used_capacity = buf.get_f32_le();
29990        __struct.available_capacity = buf.get_f32_le();
29991        __struct.read_speed = buf.get_f32_le();
29992        __struct.write_speed = buf.get_f32_le();
29993        __struct.storage_id = buf.get_u8();
29994        __struct.storage_count = buf.get_u8();
29995        let tmp = buf.get_u8();
29996        __struct.status =
29997            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29998                enum_type: "StorageStatus",
29999                value: tmp as u64,
30000            })?;
30001        let tmp = buf.get_u8();
30002        __struct.mavtype =
30003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30004                enum_type: "StorageType",
30005                value: tmp as u64,
30006            })?;
30007        let mut tmp = [0_u8; 32usize];
30008        for v in &mut tmp {
30009            *v = buf.get_u8();
30010        }
30011        __struct.name = CharArray::new(tmp);
30012        let tmp = buf.get_u8();
30013        __struct.storage_usage = StorageUsageFlag::from_bits(tmp).ok_or(
30014            ::mavlink_core::error::ParserError::InvalidFlag {
30015                flag_type: "StorageUsageFlag",
30016                value: tmp as u64,
30017            },
30018        )?;
30019        Ok(__struct)
30020    }
30021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30022        let mut __tmp = BytesMut::new(bytes);
30023        #[allow(clippy::absurd_extreme_comparisons)]
30024        #[allow(unused_comparisons)]
30025        if __tmp.remaining() < Self::ENCODED_LEN {
30026            panic!(
30027                "buffer is too small (need {} bytes, but got {})",
30028                Self::ENCODED_LEN,
30029                __tmp.remaining(),
30030            )
30031        }
30032        __tmp.put_u32_le(self.time_boot_ms);
30033        __tmp.put_f32_le(self.total_capacity);
30034        __tmp.put_f32_le(self.used_capacity);
30035        __tmp.put_f32_le(self.available_capacity);
30036        __tmp.put_f32_le(self.read_speed);
30037        __tmp.put_f32_le(self.write_speed);
30038        __tmp.put_u8(self.storage_id);
30039        __tmp.put_u8(self.storage_count);
30040        __tmp.put_u8(self.status as u8);
30041        if matches!(version, MavlinkVersion::V2) {
30042            __tmp.put_u8(self.mavtype as u8);
30043            for val in &self.name {
30044                __tmp.put_u8(*val);
30045            }
30046            __tmp.put_u8(self.storage_usage.bits());
30047            let len = __tmp.len();
30048            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30049        } else {
30050            __tmp.len()
30051        }
30052    }
30053}
30054#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30055#[doc = ""]
30056#[doc = "ID: 401"]
30057#[derive(Debug, Clone, PartialEq)]
30058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30060#[cfg_attr(feature = "ts", derive(TS))]
30061#[cfg_attr(feature = "ts", ts(export))]
30062pub struct SUPPORTED_TUNES_DATA {
30063    #[doc = "Bitfield of supported tune formats."]
30064    pub format: TuneFormat,
30065    #[doc = "System ID"]
30066    pub target_system: u8,
30067    #[doc = "Component ID"]
30068    pub target_component: u8,
30069}
30070impl SUPPORTED_TUNES_DATA {
30071    pub const ENCODED_LEN: usize = 6usize;
30072    pub const DEFAULT: Self = Self {
30073        format: TuneFormat::DEFAULT,
30074        target_system: 0_u8,
30075        target_component: 0_u8,
30076    };
30077    #[cfg(feature = "arbitrary")]
30078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30079        use arbitrary::{Arbitrary, Unstructured};
30080        let mut buf = [0u8; 1024];
30081        rng.fill_bytes(&mut buf);
30082        let mut unstructured = Unstructured::new(&buf);
30083        Self::arbitrary(&mut unstructured).unwrap_or_default()
30084    }
30085}
30086impl Default for SUPPORTED_TUNES_DATA {
30087    fn default() -> Self {
30088        Self::DEFAULT.clone()
30089    }
30090}
30091impl MessageData for SUPPORTED_TUNES_DATA {
30092    type Message = MavMessage;
30093    const ID: u32 = 401u32;
30094    const NAME: &'static str = "SUPPORTED_TUNES";
30095    const EXTRA_CRC: u8 = 183u8;
30096    const ENCODED_LEN: usize = 6usize;
30097    fn deser(
30098        _version: MavlinkVersion,
30099        __input: &[u8],
30100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30101        let avail_len = __input.len();
30102        let mut payload_buf = [0; Self::ENCODED_LEN];
30103        let mut buf = if avail_len < Self::ENCODED_LEN {
30104            payload_buf[0..avail_len].copy_from_slice(__input);
30105            Bytes::new(&payload_buf)
30106        } else {
30107            Bytes::new(__input)
30108        };
30109        let mut __struct = Self::default();
30110        let tmp = buf.get_u32_le();
30111        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30112            ::mavlink_core::error::ParserError::InvalidEnum {
30113                enum_type: "TuneFormat",
30114                value: tmp as u64,
30115            },
30116        )?;
30117        __struct.target_system = buf.get_u8();
30118        __struct.target_component = buf.get_u8();
30119        Ok(__struct)
30120    }
30121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30122        let mut __tmp = BytesMut::new(bytes);
30123        #[allow(clippy::absurd_extreme_comparisons)]
30124        #[allow(unused_comparisons)]
30125        if __tmp.remaining() < Self::ENCODED_LEN {
30126            panic!(
30127                "buffer is too small (need {} bytes, but got {})",
30128                Self::ENCODED_LEN,
30129                __tmp.remaining(),
30130            )
30131        }
30132        __tmp.put_u32_le(self.format as u32);
30133        __tmp.put_u8(self.target_system);
30134        __tmp.put_u8(self.target_component);
30135        if matches!(version, MavlinkVersion::V2) {
30136            let len = __tmp.len();
30137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30138        } else {
30139            __tmp.len()
30140        }
30141    }
30142}
30143#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30144#[doc = ""]
30145#[doc = "ID: 2"]
30146#[derive(Debug, Clone, PartialEq)]
30147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30149#[cfg_attr(feature = "ts", derive(TS))]
30150#[cfg_attr(feature = "ts", ts(export))]
30151pub struct SYSTEM_TIME_DATA {
30152    #[doc = "Timestamp (UNIX epoch time)."]
30153    pub time_unix_usec: u64,
30154    #[doc = "Timestamp (time since system boot)."]
30155    pub time_boot_ms: u32,
30156}
30157impl SYSTEM_TIME_DATA {
30158    pub const ENCODED_LEN: usize = 12usize;
30159    pub const DEFAULT: Self = Self {
30160        time_unix_usec: 0_u64,
30161        time_boot_ms: 0_u32,
30162    };
30163    #[cfg(feature = "arbitrary")]
30164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30165        use arbitrary::{Arbitrary, Unstructured};
30166        let mut buf = [0u8; 1024];
30167        rng.fill_bytes(&mut buf);
30168        let mut unstructured = Unstructured::new(&buf);
30169        Self::arbitrary(&mut unstructured).unwrap_or_default()
30170    }
30171}
30172impl Default for SYSTEM_TIME_DATA {
30173    fn default() -> Self {
30174        Self::DEFAULT.clone()
30175    }
30176}
30177impl MessageData for SYSTEM_TIME_DATA {
30178    type Message = MavMessage;
30179    const ID: u32 = 2u32;
30180    const NAME: &'static str = "SYSTEM_TIME";
30181    const EXTRA_CRC: u8 = 137u8;
30182    const ENCODED_LEN: usize = 12usize;
30183    fn deser(
30184        _version: MavlinkVersion,
30185        __input: &[u8],
30186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30187        let avail_len = __input.len();
30188        let mut payload_buf = [0; Self::ENCODED_LEN];
30189        let mut buf = if avail_len < Self::ENCODED_LEN {
30190            payload_buf[0..avail_len].copy_from_slice(__input);
30191            Bytes::new(&payload_buf)
30192        } else {
30193            Bytes::new(__input)
30194        };
30195        let mut __struct = Self::default();
30196        __struct.time_unix_usec = buf.get_u64_le();
30197        __struct.time_boot_ms = buf.get_u32_le();
30198        Ok(__struct)
30199    }
30200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30201        let mut __tmp = BytesMut::new(bytes);
30202        #[allow(clippy::absurd_extreme_comparisons)]
30203        #[allow(unused_comparisons)]
30204        if __tmp.remaining() < Self::ENCODED_LEN {
30205            panic!(
30206                "buffer is too small (need {} bytes, but got {})",
30207                Self::ENCODED_LEN,
30208                __tmp.remaining(),
30209            )
30210        }
30211        __tmp.put_u64_le(self.time_unix_usec);
30212        __tmp.put_u32_le(self.time_boot_ms);
30213        if matches!(version, MavlinkVersion::V2) {
30214            let len = __tmp.len();
30215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30216        } else {
30217            __tmp.len()
30218        }
30219    }
30220}
30221#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30222#[doc = ""]
30223#[doc = "ID: 1"]
30224#[derive(Debug, Clone, PartialEq)]
30225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30227#[cfg_attr(feature = "ts", derive(TS))]
30228#[cfg_attr(feature = "ts", ts(export))]
30229pub struct SYS_STATUS_DATA {
30230    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30231    pub onboard_control_sensors_present: MavSysStatusSensor,
30232    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30233    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30234    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30235    pub onboard_control_sensors_health: MavSysStatusSensor,
30236    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30237    pub load: u16,
30238    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30239    pub voltage_battery: u16,
30240    #[doc = "Battery current, -1: Current not sent by autopilot"]
30241    pub current_battery: i16,
30242    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30243    pub drop_rate_comm: u16,
30244    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30245    pub errors_comm: u16,
30246    #[doc = "Autopilot-specific errors"]
30247    pub errors_count1: u16,
30248    #[doc = "Autopilot-specific errors"]
30249    pub errors_count2: u16,
30250    #[doc = "Autopilot-specific errors"]
30251    pub errors_count3: u16,
30252    #[doc = "Autopilot-specific errors"]
30253    pub errors_count4: u16,
30254    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30255    pub battery_remaining: i8,
30256    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30257    #[cfg_attr(feature = "serde", serde(default))]
30258    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30259    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30260    #[cfg_attr(feature = "serde", serde(default))]
30261    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30262    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30263    #[cfg_attr(feature = "serde", serde(default))]
30264    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30265}
30266impl SYS_STATUS_DATA {
30267    pub const ENCODED_LEN: usize = 43usize;
30268    pub const DEFAULT: Self = Self {
30269        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30270        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30271        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30272        load: 0_u16,
30273        voltage_battery: 0_u16,
30274        current_battery: 0_i16,
30275        drop_rate_comm: 0_u16,
30276        errors_comm: 0_u16,
30277        errors_count1: 0_u16,
30278        errors_count2: 0_u16,
30279        errors_count3: 0_u16,
30280        errors_count4: 0_u16,
30281        battery_remaining: 0_i8,
30282        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30283        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30284        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30285    };
30286    #[cfg(feature = "arbitrary")]
30287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30288        use arbitrary::{Arbitrary, Unstructured};
30289        let mut buf = [0u8; 1024];
30290        rng.fill_bytes(&mut buf);
30291        let mut unstructured = Unstructured::new(&buf);
30292        Self::arbitrary(&mut unstructured).unwrap_or_default()
30293    }
30294}
30295impl Default for SYS_STATUS_DATA {
30296    fn default() -> Self {
30297        Self::DEFAULT.clone()
30298    }
30299}
30300impl MessageData for SYS_STATUS_DATA {
30301    type Message = MavMessage;
30302    const ID: u32 = 1u32;
30303    const NAME: &'static str = "SYS_STATUS";
30304    const EXTRA_CRC: u8 = 124u8;
30305    const ENCODED_LEN: usize = 43usize;
30306    fn deser(
30307        _version: MavlinkVersion,
30308        __input: &[u8],
30309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30310        let avail_len = __input.len();
30311        let mut payload_buf = [0; Self::ENCODED_LEN];
30312        let mut buf = if avail_len < Self::ENCODED_LEN {
30313            payload_buf[0..avail_len].copy_from_slice(__input);
30314            Bytes::new(&payload_buf)
30315        } else {
30316            Bytes::new(__input)
30317        };
30318        let mut __struct = Self::default();
30319        let tmp = buf.get_u32_le();
30320        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(tmp).ok_or(
30321            ::mavlink_core::error::ParserError::InvalidFlag {
30322                flag_type: "MavSysStatusSensor",
30323                value: tmp as u64,
30324            },
30325        )?;
30326        let tmp = buf.get_u32_le();
30327        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(tmp).ok_or(
30328            ::mavlink_core::error::ParserError::InvalidFlag {
30329                flag_type: "MavSysStatusSensor",
30330                value: tmp as u64,
30331            },
30332        )?;
30333        let tmp = buf.get_u32_le();
30334        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(tmp).ok_or(
30335            ::mavlink_core::error::ParserError::InvalidFlag {
30336                flag_type: "MavSysStatusSensor",
30337                value: tmp as u64,
30338            },
30339        )?;
30340        __struct.load = buf.get_u16_le();
30341        __struct.voltage_battery = buf.get_u16_le();
30342        __struct.current_battery = buf.get_i16_le();
30343        __struct.drop_rate_comm = buf.get_u16_le();
30344        __struct.errors_comm = buf.get_u16_le();
30345        __struct.errors_count1 = buf.get_u16_le();
30346        __struct.errors_count2 = buf.get_u16_le();
30347        __struct.errors_count3 = buf.get_u16_le();
30348        __struct.errors_count4 = buf.get_u16_le();
30349        __struct.battery_remaining = buf.get_i8();
30350        let tmp = buf.get_u32_le();
30351        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
30352            tmp,
30353        )
30354        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30355            flag_type: "MavSysStatusSensorExtended",
30356            value: tmp as u64,
30357        })?;
30358        let tmp = buf.get_u32_le();
30359        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
30360            tmp,
30361        )
30362        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30363            flag_type: "MavSysStatusSensorExtended",
30364            value: tmp as u64,
30365        })?;
30366        let tmp = buf.get_u32_le();
30367        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
30368            tmp,
30369        )
30370        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30371            flag_type: "MavSysStatusSensorExtended",
30372            value: tmp as u64,
30373        })?;
30374        Ok(__struct)
30375    }
30376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30377        let mut __tmp = BytesMut::new(bytes);
30378        #[allow(clippy::absurd_extreme_comparisons)]
30379        #[allow(unused_comparisons)]
30380        if __tmp.remaining() < Self::ENCODED_LEN {
30381            panic!(
30382                "buffer is too small (need {} bytes, but got {})",
30383                Self::ENCODED_LEN,
30384                __tmp.remaining(),
30385            )
30386        }
30387        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
30388        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
30389        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
30390        __tmp.put_u16_le(self.load);
30391        __tmp.put_u16_le(self.voltage_battery);
30392        __tmp.put_i16_le(self.current_battery);
30393        __tmp.put_u16_le(self.drop_rate_comm);
30394        __tmp.put_u16_le(self.errors_comm);
30395        __tmp.put_u16_le(self.errors_count1);
30396        __tmp.put_u16_le(self.errors_count2);
30397        __tmp.put_u16_le(self.errors_count3);
30398        __tmp.put_u16_le(self.errors_count4);
30399        __tmp.put_i8(self.battery_remaining);
30400        if matches!(version, MavlinkVersion::V2) {
30401            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
30402            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
30403            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
30404            let len = __tmp.len();
30405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30406        } else {
30407            __tmp.len()
30408        }
30409    }
30410}
30411#[doc = "Current motion information from sensors on a target."]
30412#[doc = ""]
30413#[doc = "ID: 510"]
30414#[derive(Debug, Clone, PartialEq)]
30415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30417#[cfg_attr(feature = "ts", derive(TS))]
30418#[cfg_attr(feature = "ts", ts(export))]
30419pub struct TARGET_ABSOLUTE_DATA {
30420    #[doc = "Timestamp (UNIX epoch time)."]
30421    pub timestamp: u64,
30422    #[doc = "Target's latitude (WGS84)"]
30423    pub lat: i32,
30424    #[doc = "Target's longitude (WGS84)"]
30425    pub lon: i32,
30426    #[doc = "Target's altitude (AMSL)"]
30427    pub alt: f32,
30428    #[doc = "Target's velocity in its body frame"]
30429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30430    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30431    pub vel: [f32; 3],
30432    #[doc = "Linear target's acceleration in its body frame"]
30433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30435    pub acc: [f32; 3],
30436    #[doc = "Quaternion of the target's orientation from its body frame to the vehicle's NED frame."]
30437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30439    pub q_target: [f32; 4],
30440    #[doc = "Target's roll, pitch and yaw rates"]
30441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30442    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30443    pub rates: [f32; 3],
30444    #[doc = "Standard deviation of horizontal (eph) and vertical (epv) position errors"]
30445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30446    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30447    pub position_std: [f32; 2],
30448    #[doc = "Standard deviation of the target's velocity in its body frame"]
30449    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30450    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30451    pub vel_std: [f32; 3],
30452    #[doc = "Standard deviation of the target's acceleration in its body frame"]
30453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30454    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30455    pub acc_std: [f32; 3],
30456    #[doc = "The ID of the target if multiple targets are present"]
30457    pub id: u8,
30458    #[doc = "Bitmap to indicate the sensor's reporting capabilities"]
30459    pub sensor_capabilities: TargetAbsoluteSensorCapabilityFlags,
30460}
30461impl TARGET_ABSOLUTE_DATA {
30462    pub const ENCODED_LEN: usize = 106usize;
30463    pub const DEFAULT: Self = Self {
30464        timestamp: 0_u64,
30465        lat: 0_i32,
30466        lon: 0_i32,
30467        alt: 0.0_f32,
30468        vel: [0.0_f32; 3usize],
30469        acc: [0.0_f32; 3usize],
30470        q_target: [0.0_f32; 4usize],
30471        rates: [0.0_f32; 3usize],
30472        position_std: [0.0_f32; 2usize],
30473        vel_std: [0.0_f32; 3usize],
30474        acc_std: [0.0_f32; 3usize],
30475        id: 0_u8,
30476        sensor_capabilities: TargetAbsoluteSensorCapabilityFlags::DEFAULT,
30477    };
30478    #[cfg(feature = "arbitrary")]
30479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30480        use arbitrary::{Arbitrary, Unstructured};
30481        let mut buf = [0u8; 1024];
30482        rng.fill_bytes(&mut buf);
30483        let mut unstructured = Unstructured::new(&buf);
30484        Self::arbitrary(&mut unstructured).unwrap_or_default()
30485    }
30486}
30487impl Default for TARGET_ABSOLUTE_DATA {
30488    fn default() -> Self {
30489        Self::DEFAULT.clone()
30490    }
30491}
30492impl MessageData for TARGET_ABSOLUTE_DATA {
30493    type Message = MavMessage;
30494    const ID: u32 = 510u32;
30495    const NAME: &'static str = "TARGET_ABSOLUTE";
30496    const EXTRA_CRC: u8 = 245u8;
30497    const ENCODED_LEN: usize = 106usize;
30498    fn deser(
30499        _version: MavlinkVersion,
30500        __input: &[u8],
30501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30502        let avail_len = __input.len();
30503        let mut payload_buf = [0; Self::ENCODED_LEN];
30504        let mut buf = if avail_len < Self::ENCODED_LEN {
30505            payload_buf[0..avail_len].copy_from_slice(__input);
30506            Bytes::new(&payload_buf)
30507        } else {
30508            Bytes::new(__input)
30509        };
30510        let mut __struct = Self::default();
30511        __struct.timestamp = buf.get_u64_le();
30512        __struct.lat = buf.get_i32_le();
30513        __struct.lon = buf.get_i32_le();
30514        __struct.alt = buf.get_f32_le();
30515        for v in &mut __struct.vel {
30516            let val = buf.get_f32_le();
30517            *v = val;
30518        }
30519        for v in &mut __struct.acc {
30520            let val = buf.get_f32_le();
30521            *v = val;
30522        }
30523        for v in &mut __struct.q_target {
30524            let val = buf.get_f32_le();
30525            *v = val;
30526        }
30527        for v in &mut __struct.rates {
30528            let val = buf.get_f32_le();
30529            *v = val;
30530        }
30531        for v in &mut __struct.position_std {
30532            let val = buf.get_f32_le();
30533            *v = val;
30534        }
30535        for v in &mut __struct.vel_std {
30536            let val = buf.get_f32_le();
30537            *v = val;
30538        }
30539        for v in &mut __struct.acc_std {
30540            let val = buf.get_f32_le();
30541            *v = val;
30542        }
30543        __struct.id = buf.get_u8();
30544        let tmp = buf.get_u8();
30545        __struct.sensor_capabilities = TargetAbsoluteSensorCapabilityFlags::from_bits(tmp).ok_or(
30546            ::mavlink_core::error::ParserError::InvalidFlag {
30547                flag_type: "TargetAbsoluteSensorCapabilityFlags",
30548                value: tmp as u64,
30549            },
30550        )?;
30551        Ok(__struct)
30552    }
30553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30554        let mut __tmp = BytesMut::new(bytes);
30555        #[allow(clippy::absurd_extreme_comparisons)]
30556        #[allow(unused_comparisons)]
30557        if __tmp.remaining() < Self::ENCODED_LEN {
30558            panic!(
30559                "buffer is too small (need {} bytes, but got {})",
30560                Self::ENCODED_LEN,
30561                __tmp.remaining(),
30562            )
30563        }
30564        __tmp.put_u64_le(self.timestamp);
30565        __tmp.put_i32_le(self.lat);
30566        __tmp.put_i32_le(self.lon);
30567        __tmp.put_f32_le(self.alt);
30568        for val in &self.vel {
30569            __tmp.put_f32_le(*val);
30570        }
30571        for val in &self.acc {
30572            __tmp.put_f32_le(*val);
30573        }
30574        for val in &self.q_target {
30575            __tmp.put_f32_le(*val);
30576        }
30577        for val in &self.rates {
30578            __tmp.put_f32_le(*val);
30579        }
30580        for val in &self.position_std {
30581            __tmp.put_f32_le(*val);
30582        }
30583        for val in &self.vel_std {
30584            __tmp.put_f32_le(*val);
30585        }
30586        for val in &self.acc_std {
30587            __tmp.put_f32_le(*val);
30588        }
30589        __tmp.put_u8(self.id);
30590        __tmp.put_u8(self.sensor_capabilities.bits());
30591        if matches!(version, MavlinkVersion::V2) {
30592            let len = __tmp.len();
30593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30594        } else {
30595            __tmp.len()
30596        }
30597    }
30598}
30599#[doc = "The location of a target measured by MAV's onboard sensors."]
30600#[doc = ""]
30601#[doc = "ID: 511"]
30602#[derive(Debug, Clone, PartialEq)]
30603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30605#[cfg_attr(feature = "ts", derive(TS))]
30606#[cfg_attr(feature = "ts", ts(export))]
30607pub struct TARGET_RELATIVE_DATA {
30608    #[doc = "Timestamp (UNIX epoch time)"]
30609    pub timestamp: u64,
30610    #[doc = "X Position of the target in TARGET_OBS_FRAME"]
30611    pub x: f32,
30612    #[doc = "Y Position of the target in TARGET_OBS_FRAME"]
30613    pub y: f32,
30614    #[doc = "Z Position of the target in TARGET_OBS_FRAME"]
30615    pub z: f32,
30616    #[doc = "Standard deviation of the target's position in TARGET_OBS_FRAME"]
30617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30619    pub pos_std: [f32; 3],
30620    #[doc = "Standard deviation of the target's orientation in TARGET_OBS_FRAME"]
30621    pub yaw_std: f32,
30622    #[doc = "Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30623    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30624    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30625    pub q_target: [f32; 4],
30626    #[doc = "Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30628    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30629    pub q_sensor: [f32; 4],
30630    #[doc = "The ID of the target if multiple targets are present"]
30631    pub id: u8,
30632    #[doc = "Coordinate frame used for following fields."]
30633    pub frame: TargetObsFrame,
30634    #[doc = "Type of target"]
30635    pub mavtype: LandingTargetType,
30636}
30637impl TARGET_RELATIVE_DATA {
30638    pub const ENCODED_LEN: usize = 71usize;
30639    pub const DEFAULT: Self = Self {
30640        timestamp: 0_u64,
30641        x: 0.0_f32,
30642        y: 0.0_f32,
30643        z: 0.0_f32,
30644        pos_std: [0.0_f32; 3usize],
30645        yaw_std: 0.0_f32,
30646        q_target: [0.0_f32; 4usize],
30647        q_sensor: [0.0_f32; 4usize],
30648        id: 0_u8,
30649        frame: TargetObsFrame::DEFAULT,
30650        mavtype: LandingTargetType::DEFAULT,
30651    };
30652    #[cfg(feature = "arbitrary")]
30653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30654        use arbitrary::{Arbitrary, Unstructured};
30655        let mut buf = [0u8; 1024];
30656        rng.fill_bytes(&mut buf);
30657        let mut unstructured = Unstructured::new(&buf);
30658        Self::arbitrary(&mut unstructured).unwrap_or_default()
30659    }
30660}
30661impl Default for TARGET_RELATIVE_DATA {
30662    fn default() -> Self {
30663        Self::DEFAULT.clone()
30664    }
30665}
30666impl MessageData for TARGET_RELATIVE_DATA {
30667    type Message = MavMessage;
30668    const ID: u32 = 511u32;
30669    const NAME: &'static str = "TARGET_RELATIVE";
30670    const EXTRA_CRC: u8 = 28u8;
30671    const ENCODED_LEN: usize = 71usize;
30672    fn deser(
30673        _version: MavlinkVersion,
30674        __input: &[u8],
30675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30676        let avail_len = __input.len();
30677        let mut payload_buf = [0; Self::ENCODED_LEN];
30678        let mut buf = if avail_len < Self::ENCODED_LEN {
30679            payload_buf[0..avail_len].copy_from_slice(__input);
30680            Bytes::new(&payload_buf)
30681        } else {
30682            Bytes::new(__input)
30683        };
30684        let mut __struct = Self::default();
30685        __struct.timestamp = buf.get_u64_le();
30686        __struct.x = buf.get_f32_le();
30687        __struct.y = buf.get_f32_le();
30688        __struct.z = buf.get_f32_le();
30689        for v in &mut __struct.pos_std {
30690            let val = buf.get_f32_le();
30691            *v = val;
30692        }
30693        __struct.yaw_std = buf.get_f32_le();
30694        for v in &mut __struct.q_target {
30695            let val = buf.get_f32_le();
30696            *v = val;
30697        }
30698        for v in &mut __struct.q_sensor {
30699            let val = buf.get_f32_le();
30700            *v = val;
30701        }
30702        __struct.id = buf.get_u8();
30703        let tmp = buf.get_u8();
30704        __struct.frame =
30705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30706                enum_type: "TargetObsFrame",
30707                value: tmp as u64,
30708            })?;
30709        let tmp = buf.get_u8();
30710        __struct.mavtype =
30711            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30712                enum_type: "LandingTargetType",
30713                value: tmp as u64,
30714            })?;
30715        Ok(__struct)
30716    }
30717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30718        let mut __tmp = BytesMut::new(bytes);
30719        #[allow(clippy::absurd_extreme_comparisons)]
30720        #[allow(unused_comparisons)]
30721        if __tmp.remaining() < Self::ENCODED_LEN {
30722            panic!(
30723                "buffer is too small (need {} bytes, but got {})",
30724                Self::ENCODED_LEN,
30725                __tmp.remaining(),
30726            )
30727        }
30728        __tmp.put_u64_le(self.timestamp);
30729        __tmp.put_f32_le(self.x);
30730        __tmp.put_f32_le(self.y);
30731        __tmp.put_f32_le(self.z);
30732        for val in &self.pos_std {
30733            __tmp.put_f32_le(*val);
30734        }
30735        __tmp.put_f32_le(self.yaw_std);
30736        for val in &self.q_target {
30737            __tmp.put_f32_le(*val);
30738        }
30739        for val in &self.q_sensor {
30740            __tmp.put_f32_le(*val);
30741        }
30742        __tmp.put_u8(self.id);
30743        __tmp.put_u8(self.frame as u8);
30744        __tmp.put_u8(self.mavtype as u8);
30745        if matches!(version, MavlinkVersion::V2) {
30746            let len = __tmp.len();
30747            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30748        } else {
30749            __tmp.len()
30750        }
30751    }
30752}
30753#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30754#[doc = ""]
30755#[doc = "ID: 135"]
30756#[derive(Debug, Clone, PartialEq)]
30757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30759#[cfg_attr(feature = "ts", derive(TS))]
30760#[cfg_attr(feature = "ts", ts(export))]
30761pub struct TERRAIN_CHECK_DATA {
30762    #[doc = "Latitude"]
30763    pub lat: i32,
30764    #[doc = "Longitude"]
30765    pub lon: i32,
30766}
30767impl TERRAIN_CHECK_DATA {
30768    pub const ENCODED_LEN: usize = 8usize;
30769    pub const DEFAULT: Self = Self {
30770        lat: 0_i32,
30771        lon: 0_i32,
30772    };
30773    #[cfg(feature = "arbitrary")]
30774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30775        use arbitrary::{Arbitrary, Unstructured};
30776        let mut buf = [0u8; 1024];
30777        rng.fill_bytes(&mut buf);
30778        let mut unstructured = Unstructured::new(&buf);
30779        Self::arbitrary(&mut unstructured).unwrap_or_default()
30780    }
30781}
30782impl Default for TERRAIN_CHECK_DATA {
30783    fn default() -> Self {
30784        Self::DEFAULT.clone()
30785    }
30786}
30787impl MessageData for TERRAIN_CHECK_DATA {
30788    type Message = MavMessage;
30789    const ID: u32 = 135u32;
30790    const NAME: &'static str = "TERRAIN_CHECK";
30791    const EXTRA_CRC: u8 = 203u8;
30792    const ENCODED_LEN: usize = 8usize;
30793    fn deser(
30794        _version: MavlinkVersion,
30795        __input: &[u8],
30796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30797        let avail_len = __input.len();
30798        let mut payload_buf = [0; Self::ENCODED_LEN];
30799        let mut buf = if avail_len < Self::ENCODED_LEN {
30800            payload_buf[0..avail_len].copy_from_slice(__input);
30801            Bytes::new(&payload_buf)
30802        } else {
30803            Bytes::new(__input)
30804        };
30805        let mut __struct = Self::default();
30806        __struct.lat = buf.get_i32_le();
30807        __struct.lon = buf.get_i32_le();
30808        Ok(__struct)
30809    }
30810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30811        let mut __tmp = BytesMut::new(bytes);
30812        #[allow(clippy::absurd_extreme_comparisons)]
30813        #[allow(unused_comparisons)]
30814        if __tmp.remaining() < Self::ENCODED_LEN {
30815            panic!(
30816                "buffer is too small (need {} bytes, but got {})",
30817                Self::ENCODED_LEN,
30818                __tmp.remaining(),
30819            )
30820        }
30821        __tmp.put_i32_le(self.lat);
30822        __tmp.put_i32_le(self.lon);
30823        if matches!(version, MavlinkVersion::V2) {
30824            let len = __tmp.len();
30825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30826        } else {
30827            __tmp.len()
30828        }
30829    }
30830}
30831#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30832#[doc = ""]
30833#[doc = "ID: 134"]
30834#[derive(Debug, Clone, PartialEq)]
30835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30837#[cfg_attr(feature = "ts", derive(TS))]
30838#[cfg_attr(feature = "ts", ts(export))]
30839pub struct TERRAIN_DATA_DATA {
30840    #[doc = "Latitude of SW corner of first grid"]
30841    pub lat: i32,
30842    #[doc = "Longitude of SW corner of first grid"]
30843    pub lon: i32,
30844    #[doc = "Grid spacing"]
30845    pub grid_spacing: u16,
30846    #[doc = "Terrain data MSL"]
30847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30848    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30849    pub data: [i16; 16],
30850    #[doc = "bit within the terrain request mask"]
30851    pub gridbit: u8,
30852}
30853impl TERRAIN_DATA_DATA {
30854    pub const ENCODED_LEN: usize = 43usize;
30855    pub const DEFAULT: Self = Self {
30856        lat: 0_i32,
30857        lon: 0_i32,
30858        grid_spacing: 0_u16,
30859        data: [0_i16; 16usize],
30860        gridbit: 0_u8,
30861    };
30862    #[cfg(feature = "arbitrary")]
30863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30864        use arbitrary::{Arbitrary, Unstructured};
30865        let mut buf = [0u8; 1024];
30866        rng.fill_bytes(&mut buf);
30867        let mut unstructured = Unstructured::new(&buf);
30868        Self::arbitrary(&mut unstructured).unwrap_or_default()
30869    }
30870}
30871impl Default for TERRAIN_DATA_DATA {
30872    fn default() -> Self {
30873        Self::DEFAULT.clone()
30874    }
30875}
30876impl MessageData for TERRAIN_DATA_DATA {
30877    type Message = MavMessage;
30878    const ID: u32 = 134u32;
30879    const NAME: &'static str = "TERRAIN_DATA";
30880    const EXTRA_CRC: u8 = 229u8;
30881    const ENCODED_LEN: usize = 43usize;
30882    fn deser(
30883        _version: MavlinkVersion,
30884        __input: &[u8],
30885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30886        let avail_len = __input.len();
30887        let mut payload_buf = [0; Self::ENCODED_LEN];
30888        let mut buf = if avail_len < Self::ENCODED_LEN {
30889            payload_buf[0..avail_len].copy_from_slice(__input);
30890            Bytes::new(&payload_buf)
30891        } else {
30892            Bytes::new(__input)
30893        };
30894        let mut __struct = Self::default();
30895        __struct.lat = buf.get_i32_le();
30896        __struct.lon = buf.get_i32_le();
30897        __struct.grid_spacing = buf.get_u16_le();
30898        for v in &mut __struct.data {
30899            let val = buf.get_i16_le();
30900            *v = val;
30901        }
30902        __struct.gridbit = buf.get_u8();
30903        Ok(__struct)
30904    }
30905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30906        let mut __tmp = BytesMut::new(bytes);
30907        #[allow(clippy::absurd_extreme_comparisons)]
30908        #[allow(unused_comparisons)]
30909        if __tmp.remaining() < Self::ENCODED_LEN {
30910            panic!(
30911                "buffer is too small (need {} bytes, but got {})",
30912                Self::ENCODED_LEN,
30913                __tmp.remaining(),
30914            )
30915        }
30916        __tmp.put_i32_le(self.lat);
30917        __tmp.put_i32_le(self.lon);
30918        __tmp.put_u16_le(self.grid_spacing);
30919        for val in &self.data {
30920            __tmp.put_i16_le(*val);
30921        }
30922        __tmp.put_u8(self.gridbit);
30923        if matches!(version, MavlinkVersion::V2) {
30924            let len = __tmp.len();
30925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30926        } else {
30927            __tmp.len()
30928        }
30929    }
30930}
30931#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30932#[doc = ""]
30933#[doc = "ID: 136"]
30934#[derive(Debug, Clone, PartialEq)]
30935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30937#[cfg_attr(feature = "ts", derive(TS))]
30938#[cfg_attr(feature = "ts", ts(export))]
30939pub struct TERRAIN_REPORT_DATA {
30940    #[doc = "Latitude"]
30941    pub lat: i32,
30942    #[doc = "Longitude"]
30943    pub lon: i32,
30944    #[doc = "Terrain height MSL"]
30945    pub terrain_height: f32,
30946    #[doc = "Current vehicle height above lat/lon terrain height"]
30947    pub current_height: f32,
30948    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30949    pub spacing: u16,
30950    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30951    pub pending: u16,
30952    #[doc = "Number of 4x4 terrain blocks in memory"]
30953    pub loaded: u16,
30954}
30955impl TERRAIN_REPORT_DATA {
30956    pub const ENCODED_LEN: usize = 22usize;
30957    pub const DEFAULT: Self = Self {
30958        lat: 0_i32,
30959        lon: 0_i32,
30960        terrain_height: 0.0_f32,
30961        current_height: 0.0_f32,
30962        spacing: 0_u16,
30963        pending: 0_u16,
30964        loaded: 0_u16,
30965    };
30966    #[cfg(feature = "arbitrary")]
30967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30968        use arbitrary::{Arbitrary, Unstructured};
30969        let mut buf = [0u8; 1024];
30970        rng.fill_bytes(&mut buf);
30971        let mut unstructured = Unstructured::new(&buf);
30972        Self::arbitrary(&mut unstructured).unwrap_or_default()
30973    }
30974}
30975impl Default for TERRAIN_REPORT_DATA {
30976    fn default() -> Self {
30977        Self::DEFAULT.clone()
30978    }
30979}
30980impl MessageData for TERRAIN_REPORT_DATA {
30981    type Message = MavMessage;
30982    const ID: u32 = 136u32;
30983    const NAME: &'static str = "TERRAIN_REPORT";
30984    const EXTRA_CRC: u8 = 1u8;
30985    const ENCODED_LEN: usize = 22usize;
30986    fn deser(
30987        _version: MavlinkVersion,
30988        __input: &[u8],
30989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30990        let avail_len = __input.len();
30991        let mut payload_buf = [0; Self::ENCODED_LEN];
30992        let mut buf = if avail_len < Self::ENCODED_LEN {
30993            payload_buf[0..avail_len].copy_from_slice(__input);
30994            Bytes::new(&payload_buf)
30995        } else {
30996            Bytes::new(__input)
30997        };
30998        let mut __struct = Self::default();
30999        __struct.lat = buf.get_i32_le();
31000        __struct.lon = buf.get_i32_le();
31001        __struct.terrain_height = buf.get_f32_le();
31002        __struct.current_height = buf.get_f32_le();
31003        __struct.spacing = buf.get_u16_le();
31004        __struct.pending = buf.get_u16_le();
31005        __struct.loaded = buf.get_u16_le();
31006        Ok(__struct)
31007    }
31008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31009        let mut __tmp = BytesMut::new(bytes);
31010        #[allow(clippy::absurd_extreme_comparisons)]
31011        #[allow(unused_comparisons)]
31012        if __tmp.remaining() < Self::ENCODED_LEN {
31013            panic!(
31014                "buffer is too small (need {} bytes, but got {})",
31015                Self::ENCODED_LEN,
31016                __tmp.remaining(),
31017            )
31018        }
31019        __tmp.put_i32_le(self.lat);
31020        __tmp.put_i32_le(self.lon);
31021        __tmp.put_f32_le(self.terrain_height);
31022        __tmp.put_f32_le(self.current_height);
31023        __tmp.put_u16_le(self.spacing);
31024        __tmp.put_u16_le(self.pending);
31025        __tmp.put_u16_le(self.loaded);
31026        if matches!(version, MavlinkVersion::V2) {
31027            let len = __tmp.len();
31028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31029        } else {
31030            __tmp.len()
31031        }
31032    }
31033}
31034#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31035#[doc = ""]
31036#[doc = "ID: 133"]
31037#[derive(Debug, Clone, PartialEq)]
31038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31040#[cfg_attr(feature = "ts", derive(TS))]
31041#[cfg_attr(feature = "ts", ts(export))]
31042pub struct TERRAIN_REQUEST_DATA {
31043    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31044    pub mask: u64,
31045    #[doc = "Latitude of SW corner of first grid"]
31046    pub lat: i32,
31047    #[doc = "Longitude of SW corner of first grid"]
31048    pub lon: i32,
31049    #[doc = "Grid spacing"]
31050    pub grid_spacing: u16,
31051}
31052impl TERRAIN_REQUEST_DATA {
31053    pub const ENCODED_LEN: usize = 18usize;
31054    pub const DEFAULT: Self = Self {
31055        mask: 0_u64,
31056        lat: 0_i32,
31057        lon: 0_i32,
31058        grid_spacing: 0_u16,
31059    };
31060    #[cfg(feature = "arbitrary")]
31061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31062        use arbitrary::{Arbitrary, Unstructured};
31063        let mut buf = [0u8; 1024];
31064        rng.fill_bytes(&mut buf);
31065        let mut unstructured = Unstructured::new(&buf);
31066        Self::arbitrary(&mut unstructured).unwrap_or_default()
31067    }
31068}
31069impl Default for TERRAIN_REQUEST_DATA {
31070    fn default() -> Self {
31071        Self::DEFAULT.clone()
31072    }
31073}
31074impl MessageData for TERRAIN_REQUEST_DATA {
31075    type Message = MavMessage;
31076    const ID: u32 = 133u32;
31077    const NAME: &'static str = "TERRAIN_REQUEST";
31078    const EXTRA_CRC: u8 = 6u8;
31079    const ENCODED_LEN: usize = 18usize;
31080    fn deser(
31081        _version: MavlinkVersion,
31082        __input: &[u8],
31083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31084        let avail_len = __input.len();
31085        let mut payload_buf = [0; Self::ENCODED_LEN];
31086        let mut buf = if avail_len < Self::ENCODED_LEN {
31087            payload_buf[0..avail_len].copy_from_slice(__input);
31088            Bytes::new(&payload_buf)
31089        } else {
31090            Bytes::new(__input)
31091        };
31092        let mut __struct = Self::default();
31093        __struct.mask = buf.get_u64_le();
31094        __struct.lat = buf.get_i32_le();
31095        __struct.lon = buf.get_i32_le();
31096        __struct.grid_spacing = buf.get_u16_le();
31097        Ok(__struct)
31098    }
31099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31100        let mut __tmp = BytesMut::new(bytes);
31101        #[allow(clippy::absurd_extreme_comparisons)]
31102        #[allow(unused_comparisons)]
31103        if __tmp.remaining() < Self::ENCODED_LEN {
31104            panic!(
31105                "buffer is too small (need {} bytes, but got {})",
31106                Self::ENCODED_LEN,
31107                __tmp.remaining(),
31108            )
31109        }
31110        __tmp.put_u64_le(self.mask);
31111        __tmp.put_i32_le(self.lat);
31112        __tmp.put_i32_le(self.lon);
31113        __tmp.put_u16_le(self.grid_spacing);
31114        if matches!(version, MavlinkVersion::V2) {
31115            let len = __tmp.len();
31116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31117        } else {
31118            __tmp.len()
31119        }
31120    }
31121}
31122#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31123#[doc = ""]
31124#[doc = "ID: 111"]
31125#[derive(Debug, Clone, PartialEq)]
31126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31128#[cfg_attr(feature = "ts", derive(TS))]
31129#[cfg_attr(feature = "ts", ts(export))]
31130pub struct TIMESYNC_DATA {
31131    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31132    pub tc1: i64,
31133    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31134    pub ts1: i64,
31135    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31136    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31137    pub target_system: u8,
31138    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31140    pub target_component: u8,
31141}
31142impl TIMESYNC_DATA {
31143    pub const ENCODED_LEN: usize = 18usize;
31144    pub const DEFAULT: Self = Self {
31145        tc1: 0_i64,
31146        ts1: 0_i64,
31147        target_system: 0_u8,
31148        target_component: 0_u8,
31149    };
31150    #[cfg(feature = "arbitrary")]
31151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31152        use arbitrary::{Arbitrary, Unstructured};
31153        let mut buf = [0u8; 1024];
31154        rng.fill_bytes(&mut buf);
31155        let mut unstructured = Unstructured::new(&buf);
31156        Self::arbitrary(&mut unstructured).unwrap_or_default()
31157    }
31158}
31159impl Default for TIMESYNC_DATA {
31160    fn default() -> Self {
31161        Self::DEFAULT.clone()
31162    }
31163}
31164impl MessageData for TIMESYNC_DATA {
31165    type Message = MavMessage;
31166    const ID: u32 = 111u32;
31167    const NAME: &'static str = "TIMESYNC";
31168    const EXTRA_CRC: u8 = 34u8;
31169    const ENCODED_LEN: usize = 18usize;
31170    fn deser(
31171        _version: MavlinkVersion,
31172        __input: &[u8],
31173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31174        let avail_len = __input.len();
31175        let mut payload_buf = [0; Self::ENCODED_LEN];
31176        let mut buf = if avail_len < Self::ENCODED_LEN {
31177            payload_buf[0..avail_len].copy_from_slice(__input);
31178            Bytes::new(&payload_buf)
31179        } else {
31180            Bytes::new(__input)
31181        };
31182        let mut __struct = Self::default();
31183        __struct.tc1 = buf.get_i64_le();
31184        __struct.ts1 = buf.get_i64_le();
31185        __struct.target_system = buf.get_u8();
31186        __struct.target_component = buf.get_u8();
31187        Ok(__struct)
31188    }
31189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31190        let mut __tmp = BytesMut::new(bytes);
31191        #[allow(clippy::absurd_extreme_comparisons)]
31192        #[allow(unused_comparisons)]
31193        if __tmp.remaining() < Self::ENCODED_LEN {
31194            panic!(
31195                "buffer is too small (need {} bytes, but got {})",
31196                Self::ENCODED_LEN,
31197                __tmp.remaining(),
31198            )
31199        }
31200        __tmp.put_i64_le(self.tc1);
31201        __tmp.put_i64_le(self.ts1);
31202        if matches!(version, MavlinkVersion::V2) {
31203            __tmp.put_u8(self.target_system);
31204            __tmp.put_u8(self.target_component);
31205            let len = __tmp.len();
31206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31207        } else {
31208            __tmp.len()
31209        }
31210    }
31211}
31212#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31213#[doc = ""]
31214#[doc = "ID: 380"]
31215#[derive(Debug, Clone, PartialEq)]
31216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31218#[cfg_attr(feature = "ts", derive(TS))]
31219#[cfg_attr(feature = "ts", ts(export))]
31220pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31221    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31222    pub safe_return: i32,
31223    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31224    pub land: i32,
31225    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31226    pub mission_next_item: i32,
31227    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31228    pub mission_end: i32,
31229    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31230    pub commanded_action: i32,
31231}
31232impl TIME_ESTIMATE_TO_TARGET_DATA {
31233    pub const ENCODED_LEN: usize = 20usize;
31234    pub const DEFAULT: Self = Self {
31235        safe_return: 0_i32,
31236        land: 0_i32,
31237        mission_next_item: 0_i32,
31238        mission_end: 0_i32,
31239        commanded_action: 0_i32,
31240    };
31241    #[cfg(feature = "arbitrary")]
31242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31243        use arbitrary::{Arbitrary, Unstructured};
31244        let mut buf = [0u8; 1024];
31245        rng.fill_bytes(&mut buf);
31246        let mut unstructured = Unstructured::new(&buf);
31247        Self::arbitrary(&mut unstructured).unwrap_or_default()
31248    }
31249}
31250impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31251    fn default() -> Self {
31252        Self::DEFAULT.clone()
31253    }
31254}
31255impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31256    type Message = MavMessage;
31257    const ID: u32 = 380u32;
31258    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31259    const EXTRA_CRC: u8 = 232u8;
31260    const ENCODED_LEN: usize = 20usize;
31261    fn deser(
31262        _version: MavlinkVersion,
31263        __input: &[u8],
31264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31265        let avail_len = __input.len();
31266        let mut payload_buf = [0; Self::ENCODED_LEN];
31267        let mut buf = if avail_len < Self::ENCODED_LEN {
31268            payload_buf[0..avail_len].copy_from_slice(__input);
31269            Bytes::new(&payload_buf)
31270        } else {
31271            Bytes::new(__input)
31272        };
31273        let mut __struct = Self::default();
31274        __struct.safe_return = buf.get_i32_le();
31275        __struct.land = buf.get_i32_le();
31276        __struct.mission_next_item = buf.get_i32_le();
31277        __struct.mission_end = buf.get_i32_le();
31278        __struct.commanded_action = buf.get_i32_le();
31279        Ok(__struct)
31280    }
31281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31282        let mut __tmp = BytesMut::new(bytes);
31283        #[allow(clippy::absurd_extreme_comparisons)]
31284        #[allow(unused_comparisons)]
31285        if __tmp.remaining() < Self::ENCODED_LEN {
31286            panic!(
31287                "buffer is too small (need {} bytes, but got {})",
31288                Self::ENCODED_LEN,
31289                __tmp.remaining(),
31290            )
31291        }
31292        __tmp.put_i32_le(self.safe_return);
31293        __tmp.put_i32_le(self.land);
31294        __tmp.put_i32_le(self.mission_next_item);
31295        __tmp.put_i32_le(self.mission_end);
31296        __tmp.put_i32_le(self.commanded_action);
31297        if matches!(version, MavlinkVersion::V2) {
31298            let len = __tmp.len();
31299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31300        } else {
31301            __tmp.len()
31302        }
31303    }
31304}
31305#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31306#[doc = ""]
31307#[doc = "ID: 333"]
31308#[derive(Debug, Clone, PartialEq)]
31309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31311#[cfg_attr(feature = "ts", derive(TS))]
31312#[cfg_attr(feature = "ts", ts(export))]
31313pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31315    pub time_usec: u64,
31316    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31318    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31319    pub pos_x: [f32; 5],
31320    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31322    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31323    pub pos_y: [f32; 5],
31324    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31326    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31327    pub pos_z: [f32; 5],
31328    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31329    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31330    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31331    pub delta: [f32; 5],
31332    #[doc = "Yaw. Set to NaN for unchanged"]
31333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31334    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31335    pub pos_yaw: [f32; 5],
31336    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31337    pub valid_points: u8,
31338}
31339impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31340    pub const ENCODED_LEN: usize = 109usize;
31341    pub const DEFAULT: Self = Self {
31342        time_usec: 0_u64,
31343        pos_x: [0.0_f32; 5usize],
31344        pos_y: [0.0_f32; 5usize],
31345        pos_z: [0.0_f32; 5usize],
31346        delta: [0.0_f32; 5usize],
31347        pos_yaw: [0.0_f32; 5usize],
31348        valid_points: 0_u8,
31349    };
31350    #[cfg(feature = "arbitrary")]
31351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31352        use arbitrary::{Arbitrary, Unstructured};
31353        let mut buf = [0u8; 1024];
31354        rng.fill_bytes(&mut buf);
31355        let mut unstructured = Unstructured::new(&buf);
31356        Self::arbitrary(&mut unstructured).unwrap_or_default()
31357    }
31358}
31359impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31360    fn default() -> Self {
31361        Self::DEFAULT.clone()
31362    }
31363}
31364impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31365    type Message = MavMessage;
31366    const ID: u32 = 333u32;
31367    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31368    const EXTRA_CRC: u8 = 231u8;
31369    const ENCODED_LEN: usize = 109usize;
31370    fn deser(
31371        _version: MavlinkVersion,
31372        __input: &[u8],
31373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31374        let avail_len = __input.len();
31375        let mut payload_buf = [0; Self::ENCODED_LEN];
31376        let mut buf = if avail_len < Self::ENCODED_LEN {
31377            payload_buf[0..avail_len].copy_from_slice(__input);
31378            Bytes::new(&payload_buf)
31379        } else {
31380            Bytes::new(__input)
31381        };
31382        let mut __struct = Self::default();
31383        __struct.time_usec = buf.get_u64_le();
31384        for v in &mut __struct.pos_x {
31385            let val = buf.get_f32_le();
31386            *v = val;
31387        }
31388        for v in &mut __struct.pos_y {
31389            let val = buf.get_f32_le();
31390            *v = val;
31391        }
31392        for v in &mut __struct.pos_z {
31393            let val = buf.get_f32_le();
31394            *v = val;
31395        }
31396        for v in &mut __struct.delta {
31397            let val = buf.get_f32_le();
31398            *v = val;
31399        }
31400        for v in &mut __struct.pos_yaw {
31401            let val = buf.get_f32_le();
31402            *v = val;
31403        }
31404        __struct.valid_points = buf.get_u8();
31405        Ok(__struct)
31406    }
31407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31408        let mut __tmp = BytesMut::new(bytes);
31409        #[allow(clippy::absurd_extreme_comparisons)]
31410        #[allow(unused_comparisons)]
31411        if __tmp.remaining() < Self::ENCODED_LEN {
31412            panic!(
31413                "buffer is too small (need {} bytes, but got {})",
31414                Self::ENCODED_LEN,
31415                __tmp.remaining(),
31416            )
31417        }
31418        __tmp.put_u64_le(self.time_usec);
31419        for val in &self.pos_x {
31420            __tmp.put_f32_le(*val);
31421        }
31422        for val in &self.pos_y {
31423            __tmp.put_f32_le(*val);
31424        }
31425        for val in &self.pos_z {
31426            __tmp.put_f32_le(*val);
31427        }
31428        for val in &self.delta {
31429            __tmp.put_f32_le(*val);
31430        }
31431        for val in &self.pos_yaw {
31432            __tmp.put_f32_le(*val);
31433        }
31434        __tmp.put_u8(self.valid_points);
31435        if matches!(version, MavlinkVersion::V2) {
31436            let len = __tmp.len();
31437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31438        } else {
31439            __tmp.len()
31440        }
31441    }
31442}
31443#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31444#[doc = ""]
31445#[doc = "ID: 332"]
31446#[derive(Debug, Clone, PartialEq)]
31447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31449#[cfg_attr(feature = "ts", derive(TS))]
31450#[cfg_attr(feature = "ts", ts(export))]
31451pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31453    pub time_usec: u64,
31454    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31456    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31457    pub pos_x: [f32; 5],
31458    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31459    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31460    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31461    pub pos_y: [f32; 5],
31462    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31465    pub pos_z: [f32; 5],
31466    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31469    pub vel_x: [f32; 5],
31470    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31473    pub vel_y: [f32; 5],
31474    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31477    pub vel_z: [f32; 5],
31478    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31481    pub acc_x: [f32; 5],
31482    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31485    pub acc_y: [f32; 5],
31486    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31489    pub acc_z: [f32; 5],
31490    #[doc = "Yaw angle, set to NaN if not being used"]
31491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31493    pub pos_yaw: [f32; 5],
31494    #[doc = "Yaw rate, set to NaN if not being used"]
31495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31496    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31497    pub vel_yaw: [f32; 5],
31498    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31501    pub command: [u16; 5],
31502    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31503    pub valid_points: u8,
31504}
31505impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31506    pub const ENCODED_LEN: usize = 239usize;
31507    pub const DEFAULT: Self = Self {
31508        time_usec: 0_u64,
31509        pos_x: [0.0_f32; 5usize],
31510        pos_y: [0.0_f32; 5usize],
31511        pos_z: [0.0_f32; 5usize],
31512        vel_x: [0.0_f32; 5usize],
31513        vel_y: [0.0_f32; 5usize],
31514        vel_z: [0.0_f32; 5usize],
31515        acc_x: [0.0_f32; 5usize],
31516        acc_y: [0.0_f32; 5usize],
31517        acc_z: [0.0_f32; 5usize],
31518        pos_yaw: [0.0_f32; 5usize],
31519        vel_yaw: [0.0_f32; 5usize],
31520        command: [0_u16; 5usize],
31521        valid_points: 0_u8,
31522    };
31523    #[cfg(feature = "arbitrary")]
31524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31525        use arbitrary::{Arbitrary, Unstructured};
31526        let mut buf = [0u8; 1024];
31527        rng.fill_bytes(&mut buf);
31528        let mut unstructured = Unstructured::new(&buf);
31529        Self::arbitrary(&mut unstructured).unwrap_or_default()
31530    }
31531}
31532impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31533    fn default() -> Self {
31534        Self::DEFAULT.clone()
31535    }
31536}
31537impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31538    type Message = MavMessage;
31539    const ID: u32 = 332u32;
31540    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31541    const EXTRA_CRC: u8 = 236u8;
31542    const ENCODED_LEN: usize = 239usize;
31543    fn deser(
31544        _version: MavlinkVersion,
31545        __input: &[u8],
31546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31547        let avail_len = __input.len();
31548        let mut payload_buf = [0; Self::ENCODED_LEN];
31549        let mut buf = if avail_len < Self::ENCODED_LEN {
31550            payload_buf[0..avail_len].copy_from_slice(__input);
31551            Bytes::new(&payload_buf)
31552        } else {
31553            Bytes::new(__input)
31554        };
31555        let mut __struct = Self::default();
31556        __struct.time_usec = buf.get_u64_le();
31557        for v in &mut __struct.pos_x {
31558            let val = buf.get_f32_le();
31559            *v = val;
31560        }
31561        for v in &mut __struct.pos_y {
31562            let val = buf.get_f32_le();
31563            *v = val;
31564        }
31565        for v in &mut __struct.pos_z {
31566            let val = buf.get_f32_le();
31567            *v = val;
31568        }
31569        for v in &mut __struct.vel_x {
31570            let val = buf.get_f32_le();
31571            *v = val;
31572        }
31573        for v in &mut __struct.vel_y {
31574            let val = buf.get_f32_le();
31575            *v = val;
31576        }
31577        for v in &mut __struct.vel_z {
31578            let val = buf.get_f32_le();
31579            *v = val;
31580        }
31581        for v in &mut __struct.acc_x {
31582            let val = buf.get_f32_le();
31583            *v = val;
31584        }
31585        for v in &mut __struct.acc_y {
31586            let val = buf.get_f32_le();
31587            *v = val;
31588        }
31589        for v in &mut __struct.acc_z {
31590            let val = buf.get_f32_le();
31591            *v = val;
31592        }
31593        for v in &mut __struct.pos_yaw {
31594            let val = buf.get_f32_le();
31595            *v = val;
31596        }
31597        for v in &mut __struct.vel_yaw {
31598            let val = buf.get_f32_le();
31599            *v = val;
31600        }
31601        for v in &mut __struct.command {
31602            let val = buf.get_u16_le();
31603            *v = val;
31604        }
31605        __struct.valid_points = buf.get_u8();
31606        Ok(__struct)
31607    }
31608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31609        let mut __tmp = BytesMut::new(bytes);
31610        #[allow(clippy::absurd_extreme_comparisons)]
31611        #[allow(unused_comparisons)]
31612        if __tmp.remaining() < Self::ENCODED_LEN {
31613            panic!(
31614                "buffer is too small (need {} bytes, but got {})",
31615                Self::ENCODED_LEN,
31616                __tmp.remaining(),
31617            )
31618        }
31619        __tmp.put_u64_le(self.time_usec);
31620        for val in &self.pos_x {
31621            __tmp.put_f32_le(*val);
31622        }
31623        for val in &self.pos_y {
31624            __tmp.put_f32_le(*val);
31625        }
31626        for val in &self.pos_z {
31627            __tmp.put_f32_le(*val);
31628        }
31629        for val in &self.vel_x {
31630            __tmp.put_f32_le(*val);
31631        }
31632        for val in &self.vel_y {
31633            __tmp.put_f32_le(*val);
31634        }
31635        for val in &self.vel_z {
31636            __tmp.put_f32_le(*val);
31637        }
31638        for val in &self.acc_x {
31639            __tmp.put_f32_le(*val);
31640        }
31641        for val in &self.acc_y {
31642            __tmp.put_f32_le(*val);
31643        }
31644        for val in &self.acc_z {
31645            __tmp.put_f32_le(*val);
31646        }
31647        for val in &self.pos_yaw {
31648            __tmp.put_f32_le(*val);
31649        }
31650        for val in &self.vel_yaw {
31651            __tmp.put_f32_le(*val);
31652        }
31653        for val in &self.command {
31654            __tmp.put_u16_le(*val);
31655        }
31656        __tmp.put_u8(self.valid_points);
31657        if matches!(version, MavlinkVersion::V2) {
31658            let len = __tmp.len();
31659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31660        } else {
31661            __tmp.len()
31662        }
31663    }
31664}
31665#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31666#[doc = ""]
31667#[doc = "ID: 385"]
31668#[derive(Debug, Clone, PartialEq)]
31669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31671#[cfg_attr(feature = "ts", derive(TS))]
31672#[cfg_attr(feature = "ts", ts(export))]
31673pub struct TUNNEL_DATA {
31674    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31675    pub payload_type: MavTunnelPayloadType,
31676    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31677    pub target_system: u8,
31678    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
31679    pub target_component: u8,
31680    #[doc = "Length of the data transported in payload"]
31681    pub payload_length: u8,
31682    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
31683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31685    pub payload: [u8; 128],
31686}
31687impl TUNNEL_DATA {
31688    pub const ENCODED_LEN: usize = 133usize;
31689    pub const DEFAULT: Self = Self {
31690        payload_type: MavTunnelPayloadType::DEFAULT,
31691        target_system: 0_u8,
31692        target_component: 0_u8,
31693        payload_length: 0_u8,
31694        payload: [0_u8; 128usize],
31695    };
31696    #[cfg(feature = "arbitrary")]
31697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31698        use arbitrary::{Arbitrary, Unstructured};
31699        let mut buf = [0u8; 1024];
31700        rng.fill_bytes(&mut buf);
31701        let mut unstructured = Unstructured::new(&buf);
31702        Self::arbitrary(&mut unstructured).unwrap_or_default()
31703    }
31704}
31705impl Default for TUNNEL_DATA {
31706    fn default() -> Self {
31707        Self::DEFAULT.clone()
31708    }
31709}
31710impl MessageData for TUNNEL_DATA {
31711    type Message = MavMessage;
31712    const ID: u32 = 385u32;
31713    const NAME: &'static str = "TUNNEL";
31714    const EXTRA_CRC: u8 = 147u8;
31715    const ENCODED_LEN: usize = 133usize;
31716    fn deser(
31717        _version: MavlinkVersion,
31718        __input: &[u8],
31719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31720        let avail_len = __input.len();
31721        let mut payload_buf = [0; Self::ENCODED_LEN];
31722        let mut buf = if avail_len < Self::ENCODED_LEN {
31723            payload_buf[0..avail_len].copy_from_slice(__input);
31724            Bytes::new(&payload_buf)
31725        } else {
31726            Bytes::new(__input)
31727        };
31728        let mut __struct = Self::default();
31729        let tmp = buf.get_u16_le();
31730        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31731            ::mavlink_core::error::ParserError::InvalidEnum {
31732                enum_type: "MavTunnelPayloadType",
31733                value: tmp as u64,
31734            },
31735        )?;
31736        __struct.target_system = buf.get_u8();
31737        __struct.target_component = buf.get_u8();
31738        __struct.payload_length = buf.get_u8();
31739        for v in &mut __struct.payload {
31740            let val = buf.get_u8();
31741            *v = val;
31742        }
31743        Ok(__struct)
31744    }
31745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31746        let mut __tmp = BytesMut::new(bytes);
31747        #[allow(clippy::absurd_extreme_comparisons)]
31748        #[allow(unused_comparisons)]
31749        if __tmp.remaining() < Self::ENCODED_LEN {
31750            panic!(
31751                "buffer is too small (need {} bytes, but got {})",
31752                Self::ENCODED_LEN,
31753                __tmp.remaining(),
31754            )
31755        }
31756        __tmp.put_u16_le(self.payload_type as u16);
31757        __tmp.put_u8(self.target_system);
31758        __tmp.put_u8(self.target_component);
31759        __tmp.put_u8(self.payload_length);
31760        for val in &self.payload {
31761            __tmp.put_u8(*val);
31762        }
31763        if matches!(version, MavlinkVersion::V2) {
31764            let len = __tmp.len();
31765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31766        } else {
31767            __tmp.len()
31768        }
31769    }
31770}
31771#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31772#[doc = ""]
31773#[doc = "ID: 311"]
31774#[derive(Debug, Clone, PartialEq)]
31775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31777#[cfg_attr(feature = "ts", derive(TS))]
31778#[cfg_attr(feature = "ts", ts(export))]
31779pub struct UAVCAN_NODE_INFO_DATA {
31780    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31781    pub time_usec: u64,
31782    #[doc = "Time since the start-up of the node."]
31783    pub uptime_sec: u32,
31784    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31785    pub sw_vcs_commit: u32,
31786    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31787    #[cfg_attr(feature = "ts", ts(type = "string"))]
31788    pub name: CharArray<80>,
31789    #[doc = "Hardware major version number."]
31790    pub hw_version_major: u8,
31791    #[doc = "Hardware minor version number."]
31792    pub hw_version_minor: u8,
31793    #[doc = "Hardware unique 128-bit ID."]
31794    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31795    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31796    pub hw_unique_id: [u8; 16],
31797    #[doc = "Software major version number."]
31798    pub sw_version_major: u8,
31799    #[doc = "Software minor version number."]
31800    pub sw_version_minor: u8,
31801}
31802impl UAVCAN_NODE_INFO_DATA {
31803    pub const ENCODED_LEN: usize = 116usize;
31804    pub const DEFAULT: Self = Self {
31805        time_usec: 0_u64,
31806        uptime_sec: 0_u32,
31807        sw_vcs_commit: 0_u32,
31808        name: CharArray::new([0_u8; 80usize]),
31809        hw_version_major: 0_u8,
31810        hw_version_minor: 0_u8,
31811        hw_unique_id: [0_u8; 16usize],
31812        sw_version_major: 0_u8,
31813        sw_version_minor: 0_u8,
31814    };
31815    #[cfg(feature = "arbitrary")]
31816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31817        use arbitrary::{Arbitrary, Unstructured};
31818        let mut buf = [0u8; 1024];
31819        rng.fill_bytes(&mut buf);
31820        let mut unstructured = Unstructured::new(&buf);
31821        Self::arbitrary(&mut unstructured).unwrap_or_default()
31822    }
31823}
31824impl Default for UAVCAN_NODE_INFO_DATA {
31825    fn default() -> Self {
31826        Self::DEFAULT.clone()
31827    }
31828}
31829impl MessageData for UAVCAN_NODE_INFO_DATA {
31830    type Message = MavMessage;
31831    const ID: u32 = 311u32;
31832    const NAME: &'static str = "UAVCAN_NODE_INFO";
31833    const EXTRA_CRC: u8 = 95u8;
31834    const ENCODED_LEN: usize = 116usize;
31835    fn deser(
31836        _version: MavlinkVersion,
31837        __input: &[u8],
31838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31839        let avail_len = __input.len();
31840        let mut payload_buf = [0; Self::ENCODED_LEN];
31841        let mut buf = if avail_len < Self::ENCODED_LEN {
31842            payload_buf[0..avail_len].copy_from_slice(__input);
31843            Bytes::new(&payload_buf)
31844        } else {
31845            Bytes::new(__input)
31846        };
31847        let mut __struct = Self::default();
31848        __struct.time_usec = buf.get_u64_le();
31849        __struct.uptime_sec = buf.get_u32_le();
31850        __struct.sw_vcs_commit = buf.get_u32_le();
31851        let mut tmp = [0_u8; 80usize];
31852        for v in &mut tmp {
31853            *v = buf.get_u8();
31854        }
31855        __struct.name = CharArray::new(tmp);
31856        __struct.hw_version_major = buf.get_u8();
31857        __struct.hw_version_minor = buf.get_u8();
31858        for v in &mut __struct.hw_unique_id {
31859            let val = buf.get_u8();
31860            *v = val;
31861        }
31862        __struct.sw_version_major = buf.get_u8();
31863        __struct.sw_version_minor = buf.get_u8();
31864        Ok(__struct)
31865    }
31866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31867        let mut __tmp = BytesMut::new(bytes);
31868        #[allow(clippy::absurd_extreme_comparisons)]
31869        #[allow(unused_comparisons)]
31870        if __tmp.remaining() < Self::ENCODED_LEN {
31871            panic!(
31872                "buffer is too small (need {} bytes, but got {})",
31873                Self::ENCODED_LEN,
31874                __tmp.remaining(),
31875            )
31876        }
31877        __tmp.put_u64_le(self.time_usec);
31878        __tmp.put_u32_le(self.uptime_sec);
31879        __tmp.put_u32_le(self.sw_vcs_commit);
31880        for val in &self.name {
31881            __tmp.put_u8(*val);
31882        }
31883        __tmp.put_u8(self.hw_version_major);
31884        __tmp.put_u8(self.hw_version_minor);
31885        for val in &self.hw_unique_id {
31886            __tmp.put_u8(*val);
31887        }
31888        __tmp.put_u8(self.sw_version_major);
31889        __tmp.put_u8(self.sw_version_minor);
31890        if matches!(version, MavlinkVersion::V2) {
31891            let len = __tmp.len();
31892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31893        } else {
31894            __tmp.len()
31895        }
31896    }
31897}
31898#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31899#[doc = ""]
31900#[doc = "ID: 310"]
31901#[derive(Debug, Clone, PartialEq)]
31902#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31903#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31904#[cfg_attr(feature = "ts", derive(TS))]
31905#[cfg_attr(feature = "ts", ts(export))]
31906pub struct UAVCAN_NODE_STATUS_DATA {
31907    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31908    pub time_usec: u64,
31909    #[doc = "Time since the start-up of the node."]
31910    pub uptime_sec: u32,
31911    #[doc = "Vendor-specific status information."]
31912    pub vendor_specific_status_code: u16,
31913    #[doc = "Generalized node health status."]
31914    pub health: UavcanNodeHealth,
31915    #[doc = "Generalized operating mode."]
31916    pub mode: UavcanNodeMode,
31917    #[doc = "Not used currently."]
31918    pub sub_mode: u8,
31919}
31920impl UAVCAN_NODE_STATUS_DATA {
31921    pub const ENCODED_LEN: usize = 17usize;
31922    pub const DEFAULT: Self = Self {
31923        time_usec: 0_u64,
31924        uptime_sec: 0_u32,
31925        vendor_specific_status_code: 0_u16,
31926        health: UavcanNodeHealth::DEFAULT,
31927        mode: UavcanNodeMode::DEFAULT,
31928        sub_mode: 0_u8,
31929    };
31930    #[cfg(feature = "arbitrary")]
31931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31932        use arbitrary::{Arbitrary, Unstructured};
31933        let mut buf = [0u8; 1024];
31934        rng.fill_bytes(&mut buf);
31935        let mut unstructured = Unstructured::new(&buf);
31936        Self::arbitrary(&mut unstructured).unwrap_or_default()
31937    }
31938}
31939impl Default for UAVCAN_NODE_STATUS_DATA {
31940    fn default() -> Self {
31941        Self::DEFAULT.clone()
31942    }
31943}
31944impl MessageData for UAVCAN_NODE_STATUS_DATA {
31945    type Message = MavMessage;
31946    const ID: u32 = 310u32;
31947    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31948    const EXTRA_CRC: u8 = 28u8;
31949    const ENCODED_LEN: usize = 17usize;
31950    fn deser(
31951        _version: MavlinkVersion,
31952        __input: &[u8],
31953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31954        let avail_len = __input.len();
31955        let mut payload_buf = [0; Self::ENCODED_LEN];
31956        let mut buf = if avail_len < Self::ENCODED_LEN {
31957            payload_buf[0..avail_len].copy_from_slice(__input);
31958            Bytes::new(&payload_buf)
31959        } else {
31960            Bytes::new(__input)
31961        };
31962        let mut __struct = Self::default();
31963        __struct.time_usec = buf.get_u64_le();
31964        __struct.uptime_sec = buf.get_u32_le();
31965        __struct.vendor_specific_status_code = buf.get_u16_le();
31966        let tmp = buf.get_u8();
31967        __struct.health =
31968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31969                enum_type: "UavcanNodeHealth",
31970                value: tmp as u64,
31971            })?;
31972        let tmp = buf.get_u8();
31973        __struct.mode =
31974            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31975                enum_type: "UavcanNodeMode",
31976                value: tmp as u64,
31977            })?;
31978        __struct.sub_mode = buf.get_u8();
31979        Ok(__struct)
31980    }
31981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31982        let mut __tmp = BytesMut::new(bytes);
31983        #[allow(clippy::absurd_extreme_comparisons)]
31984        #[allow(unused_comparisons)]
31985        if __tmp.remaining() < Self::ENCODED_LEN {
31986            panic!(
31987                "buffer is too small (need {} bytes, but got {})",
31988                Self::ENCODED_LEN,
31989                __tmp.remaining(),
31990            )
31991        }
31992        __tmp.put_u64_le(self.time_usec);
31993        __tmp.put_u32_le(self.uptime_sec);
31994        __tmp.put_u16_le(self.vendor_specific_status_code);
31995        __tmp.put_u8(self.health as u8);
31996        __tmp.put_u8(self.mode as u8);
31997        __tmp.put_u8(self.sub_mode);
31998        if matches!(version, MavlinkVersion::V2) {
31999            let len = __tmp.len();
32000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32001        } else {
32002            __tmp.len()
32003        }
32004    }
32005}
32006#[doc = "The global position resulting from GPS and sensor fusion."]
32007#[doc = ""]
32008#[doc = "ID: 340"]
32009#[derive(Debug, Clone, PartialEq)]
32010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32012#[cfg_attr(feature = "ts", derive(TS))]
32013#[cfg_attr(feature = "ts", ts(export))]
32014pub struct UTM_GLOBAL_POSITION_DATA {
32015    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32016    pub time: u64,
32017    #[doc = "Latitude (WGS84)"]
32018    pub lat: i32,
32019    #[doc = "Longitude (WGS84)"]
32020    pub lon: i32,
32021    #[doc = "Altitude (WGS84)"]
32022    pub alt: i32,
32023    #[doc = "Altitude above ground"]
32024    pub relative_alt: i32,
32025    #[doc = "Next waypoint, latitude (WGS84)"]
32026    pub next_lat: i32,
32027    #[doc = "Next waypoint, longitude (WGS84)"]
32028    pub next_lon: i32,
32029    #[doc = "Next waypoint, altitude (WGS84)"]
32030    pub next_alt: i32,
32031    #[doc = "Ground X speed (latitude, positive north)"]
32032    pub vx: i16,
32033    #[doc = "Ground Y speed (longitude, positive east)"]
32034    pub vy: i16,
32035    #[doc = "Ground Z speed (altitude, positive down)"]
32036    pub vz: i16,
32037    #[doc = "Horizontal position uncertainty (standard deviation)"]
32038    pub h_acc: u16,
32039    #[doc = "Altitude uncertainty (standard deviation)"]
32040    pub v_acc: u16,
32041    #[doc = "Speed uncertainty (standard deviation)"]
32042    pub vel_acc: u16,
32043    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32044    pub update_rate: u16,
32045    #[doc = "Unique UAS ID."]
32046    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32047    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32048    pub uas_id: [u8; 18],
32049    #[doc = "Flight state"]
32050    pub flight_state: UtmFlightState,
32051    #[doc = "Bitwise OR combination of the data available flags."]
32052    pub flags: UtmDataAvailFlags,
32053}
32054impl UTM_GLOBAL_POSITION_DATA {
32055    pub const ENCODED_LEN: usize = 70usize;
32056    pub const DEFAULT: Self = Self {
32057        time: 0_u64,
32058        lat: 0_i32,
32059        lon: 0_i32,
32060        alt: 0_i32,
32061        relative_alt: 0_i32,
32062        next_lat: 0_i32,
32063        next_lon: 0_i32,
32064        next_alt: 0_i32,
32065        vx: 0_i16,
32066        vy: 0_i16,
32067        vz: 0_i16,
32068        h_acc: 0_u16,
32069        v_acc: 0_u16,
32070        vel_acc: 0_u16,
32071        update_rate: 0_u16,
32072        uas_id: [0_u8; 18usize],
32073        flight_state: UtmFlightState::DEFAULT,
32074        flags: UtmDataAvailFlags::DEFAULT,
32075    };
32076    #[cfg(feature = "arbitrary")]
32077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32078        use arbitrary::{Arbitrary, Unstructured};
32079        let mut buf = [0u8; 1024];
32080        rng.fill_bytes(&mut buf);
32081        let mut unstructured = Unstructured::new(&buf);
32082        Self::arbitrary(&mut unstructured).unwrap_or_default()
32083    }
32084}
32085impl Default for UTM_GLOBAL_POSITION_DATA {
32086    fn default() -> Self {
32087        Self::DEFAULT.clone()
32088    }
32089}
32090impl MessageData for UTM_GLOBAL_POSITION_DATA {
32091    type Message = MavMessage;
32092    const ID: u32 = 340u32;
32093    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32094    const EXTRA_CRC: u8 = 99u8;
32095    const ENCODED_LEN: usize = 70usize;
32096    fn deser(
32097        _version: MavlinkVersion,
32098        __input: &[u8],
32099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32100        let avail_len = __input.len();
32101        let mut payload_buf = [0; Self::ENCODED_LEN];
32102        let mut buf = if avail_len < Self::ENCODED_LEN {
32103            payload_buf[0..avail_len].copy_from_slice(__input);
32104            Bytes::new(&payload_buf)
32105        } else {
32106            Bytes::new(__input)
32107        };
32108        let mut __struct = Self::default();
32109        __struct.time = buf.get_u64_le();
32110        __struct.lat = buf.get_i32_le();
32111        __struct.lon = buf.get_i32_le();
32112        __struct.alt = buf.get_i32_le();
32113        __struct.relative_alt = buf.get_i32_le();
32114        __struct.next_lat = buf.get_i32_le();
32115        __struct.next_lon = buf.get_i32_le();
32116        __struct.next_alt = buf.get_i32_le();
32117        __struct.vx = buf.get_i16_le();
32118        __struct.vy = buf.get_i16_le();
32119        __struct.vz = buf.get_i16_le();
32120        __struct.h_acc = buf.get_u16_le();
32121        __struct.v_acc = buf.get_u16_le();
32122        __struct.vel_acc = buf.get_u16_le();
32123        __struct.update_rate = buf.get_u16_le();
32124        for v in &mut __struct.uas_id {
32125            let val = buf.get_u8();
32126            *v = val;
32127        }
32128        let tmp = buf.get_u8();
32129        __struct.flight_state =
32130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32131                enum_type: "UtmFlightState",
32132                value: tmp as u64,
32133            })?;
32134        let tmp = buf.get_u8();
32135        __struct.flags = UtmDataAvailFlags::from_bits(tmp).ok_or(
32136            ::mavlink_core::error::ParserError::InvalidFlag {
32137                flag_type: "UtmDataAvailFlags",
32138                value: tmp as u64,
32139            },
32140        )?;
32141        Ok(__struct)
32142    }
32143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32144        let mut __tmp = BytesMut::new(bytes);
32145        #[allow(clippy::absurd_extreme_comparisons)]
32146        #[allow(unused_comparisons)]
32147        if __tmp.remaining() < Self::ENCODED_LEN {
32148            panic!(
32149                "buffer is too small (need {} bytes, but got {})",
32150                Self::ENCODED_LEN,
32151                __tmp.remaining(),
32152            )
32153        }
32154        __tmp.put_u64_le(self.time);
32155        __tmp.put_i32_le(self.lat);
32156        __tmp.put_i32_le(self.lon);
32157        __tmp.put_i32_le(self.alt);
32158        __tmp.put_i32_le(self.relative_alt);
32159        __tmp.put_i32_le(self.next_lat);
32160        __tmp.put_i32_le(self.next_lon);
32161        __tmp.put_i32_le(self.next_alt);
32162        __tmp.put_i16_le(self.vx);
32163        __tmp.put_i16_le(self.vy);
32164        __tmp.put_i16_le(self.vz);
32165        __tmp.put_u16_le(self.h_acc);
32166        __tmp.put_u16_le(self.v_acc);
32167        __tmp.put_u16_le(self.vel_acc);
32168        __tmp.put_u16_le(self.update_rate);
32169        for val in &self.uas_id {
32170            __tmp.put_u8(*val);
32171        }
32172        __tmp.put_u8(self.flight_state as u8);
32173        __tmp.put_u8(self.flags.bits());
32174        if matches!(version, MavlinkVersion::V2) {
32175            let len = __tmp.len();
32176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32177        } else {
32178            __tmp.len()
32179        }
32180    }
32181}
32182#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32183#[doc = ""]
32184#[doc = "ID: 248"]
32185#[derive(Debug, Clone, PartialEq)]
32186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32188#[cfg_attr(feature = "ts", derive(TS))]
32189#[cfg_attr(feature = "ts", ts(export))]
32190pub struct V2_EXTENSION_DATA {
32191    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32192    pub message_type: u16,
32193    #[doc = "Network ID (0 for broadcast)"]
32194    pub target_network: u8,
32195    #[doc = "System ID (0 for broadcast)"]
32196    pub target_system: u8,
32197    #[doc = "Component ID (0 for broadcast)"]
32198    pub target_component: u8,
32199    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32200    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32201    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32202    pub payload: [u8; 249],
32203}
32204impl V2_EXTENSION_DATA {
32205    pub const ENCODED_LEN: usize = 254usize;
32206    pub const DEFAULT: Self = Self {
32207        message_type: 0_u16,
32208        target_network: 0_u8,
32209        target_system: 0_u8,
32210        target_component: 0_u8,
32211        payload: [0_u8; 249usize],
32212    };
32213    #[cfg(feature = "arbitrary")]
32214    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32215        use arbitrary::{Arbitrary, Unstructured};
32216        let mut buf = [0u8; 1024];
32217        rng.fill_bytes(&mut buf);
32218        let mut unstructured = Unstructured::new(&buf);
32219        Self::arbitrary(&mut unstructured).unwrap_or_default()
32220    }
32221}
32222impl Default for V2_EXTENSION_DATA {
32223    fn default() -> Self {
32224        Self::DEFAULT.clone()
32225    }
32226}
32227impl MessageData for V2_EXTENSION_DATA {
32228    type Message = MavMessage;
32229    const ID: u32 = 248u32;
32230    const NAME: &'static str = "V2_EXTENSION";
32231    const EXTRA_CRC: u8 = 8u8;
32232    const ENCODED_LEN: usize = 254usize;
32233    fn deser(
32234        _version: MavlinkVersion,
32235        __input: &[u8],
32236    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32237        let avail_len = __input.len();
32238        let mut payload_buf = [0; Self::ENCODED_LEN];
32239        let mut buf = if avail_len < Self::ENCODED_LEN {
32240            payload_buf[0..avail_len].copy_from_slice(__input);
32241            Bytes::new(&payload_buf)
32242        } else {
32243            Bytes::new(__input)
32244        };
32245        let mut __struct = Self::default();
32246        __struct.message_type = buf.get_u16_le();
32247        __struct.target_network = buf.get_u8();
32248        __struct.target_system = buf.get_u8();
32249        __struct.target_component = buf.get_u8();
32250        for v in &mut __struct.payload {
32251            let val = buf.get_u8();
32252            *v = val;
32253        }
32254        Ok(__struct)
32255    }
32256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32257        let mut __tmp = BytesMut::new(bytes);
32258        #[allow(clippy::absurd_extreme_comparisons)]
32259        #[allow(unused_comparisons)]
32260        if __tmp.remaining() < Self::ENCODED_LEN {
32261            panic!(
32262                "buffer is too small (need {} bytes, but got {})",
32263                Self::ENCODED_LEN,
32264                __tmp.remaining(),
32265            )
32266        }
32267        __tmp.put_u16_le(self.message_type);
32268        __tmp.put_u8(self.target_network);
32269        __tmp.put_u8(self.target_system);
32270        __tmp.put_u8(self.target_component);
32271        for val in &self.payload {
32272            __tmp.put_u8(*val);
32273        }
32274        if matches!(version, MavlinkVersion::V2) {
32275            let len = __tmp.len();
32276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32277        } else {
32278            __tmp.len()
32279        }
32280    }
32281}
32282#[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
32283#[doc = ""]
32284#[doc = "ID: 355"]
32285#[derive(Debug, Clone, PartialEq)]
32286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32288#[cfg_attr(feature = "ts", derive(TS))]
32289#[cfg_attr(feature = "ts", ts(export))]
32290pub struct VELOCITY_LIMITS_DATA {
32291    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32292    pub horizontal_speed_limit: f32,
32293    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32294    pub vertical_speed_limit: f32,
32295    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: No limit applied"]
32296    pub yaw_rate_limit: f32,
32297}
32298impl VELOCITY_LIMITS_DATA {
32299    pub const ENCODED_LEN: usize = 12usize;
32300    pub const DEFAULT: Self = Self {
32301        horizontal_speed_limit: 0.0_f32,
32302        vertical_speed_limit: 0.0_f32,
32303        yaw_rate_limit: 0.0_f32,
32304    };
32305    #[cfg(feature = "arbitrary")]
32306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32307        use arbitrary::{Arbitrary, Unstructured};
32308        let mut buf = [0u8; 1024];
32309        rng.fill_bytes(&mut buf);
32310        let mut unstructured = Unstructured::new(&buf);
32311        Self::arbitrary(&mut unstructured).unwrap_or_default()
32312    }
32313}
32314impl Default for VELOCITY_LIMITS_DATA {
32315    fn default() -> Self {
32316        Self::DEFAULT.clone()
32317    }
32318}
32319impl MessageData for VELOCITY_LIMITS_DATA {
32320    type Message = MavMessage;
32321    const ID: u32 = 355u32;
32322    const NAME: &'static str = "VELOCITY_LIMITS";
32323    const EXTRA_CRC: u8 = 6u8;
32324    const ENCODED_LEN: usize = 12usize;
32325    fn deser(
32326        _version: MavlinkVersion,
32327        __input: &[u8],
32328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32329        let avail_len = __input.len();
32330        let mut payload_buf = [0; Self::ENCODED_LEN];
32331        let mut buf = if avail_len < Self::ENCODED_LEN {
32332            payload_buf[0..avail_len].copy_from_slice(__input);
32333            Bytes::new(&payload_buf)
32334        } else {
32335            Bytes::new(__input)
32336        };
32337        let mut __struct = Self::default();
32338        __struct.horizontal_speed_limit = buf.get_f32_le();
32339        __struct.vertical_speed_limit = buf.get_f32_le();
32340        __struct.yaw_rate_limit = buf.get_f32_le();
32341        Ok(__struct)
32342    }
32343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32344        let mut __tmp = BytesMut::new(bytes);
32345        #[allow(clippy::absurd_extreme_comparisons)]
32346        #[allow(unused_comparisons)]
32347        if __tmp.remaining() < Self::ENCODED_LEN {
32348            panic!(
32349                "buffer is too small (need {} bytes, but got {})",
32350                Self::ENCODED_LEN,
32351                __tmp.remaining(),
32352            )
32353        }
32354        __tmp.put_f32_le(self.horizontal_speed_limit);
32355        __tmp.put_f32_le(self.vertical_speed_limit);
32356        __tmp.put_f32_le(self.yaw_rate_limit);
32357        if matches!(version, MavlinkVersion::V2) {
32358            let len = __tmp.len();
32359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32360        } else {
32361            __tmp.len()
32362        }
32363    }
32364}
32365#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32366#[doc = ""]
32367#[doc = "ID: 74"]
32368#[derive(Debug, Clone, PartialEq)]
32369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32371#[cfg_attr(feature = "ts", derive(TS))]
32372#[cfg_attr(feature = "ts", ts(export))]
32373pub struct VFR_HUD_DATA {
32374    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32375    pub airspeed: f32,
32376    #[doc = "Current ground speed."]
32377    pub groundspeed: f32,
32378    #[doc = "Current altitude (MSL)."]
32379    pub alt: f32,
32380    #[doc = "Current climb rate."]
32381    pub climb: f32,
32382    #[doc = "Current heading in compass units (0-360, 0=north)."]
32383    pub heading: i16,
32384    #[doc = "Current throttle setting (0 to 100)."]
32385    pub throttle: u16,
32386}
32387impl VFR_HUD_DATA {
32388    pub const ENCODED_LEN: usize = 20usize;
32389    pub const DEFAULT: Self = Self {
32390        airspeed: 0.0_f32,
32391        groundspeed: 0.0_f32,
32392        alt: 0.0_f32,
32393        climb: 0.0_f32,
32394        heading: 0_i16,
32395        throttle: 0_u16,
32396    };
32397    #[cfg(feature = "arbitrary")]
32398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32399        use arbitrary::{Arbitrary, Unstructured};
32400        let mut buf = [0u8; 1024];
32401        rng.fill_bytes(&mut buf);
32402        let mut unstructured = Unstructured::new(&buf);
32403        Self::arbitrary(&mut unstructured).unwrap_or_default()
32404    }
32405}
32406impl Default for VFR_HUD_DATA {
32407    fn default() -> Self {
32408        Self::DEFAULT.clone()
32409    }
32410}
32411impl MessageData for VFR_HUD_DATA {
32412    type Message = MavMessage;
32413    const ID: u32 = 74u32;
32414    const NAME: &'static str = "VFR_HUD";
32415    const EXTRA_CRC: u8 = 20u8;
32416    const ENCODED_LEN: usize = 20usize;
32417    fn deser(
32418        _version: MavlinkVersion,
32419        __input: &[u8],
32420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32421        let avail_len = __input.len();
32422        let mut payload_buf = [0; Self::ENCODED_LEN];
32423        let mut buf = if avail_len < Self::ENCODED_LEN {
32424            payload_buf[0..avail_len].copy_from_slice(__input);
32425            Bytes::new(&payload_buf)
32426        } else {
32427            Bytes::new(__input)
32428        };
32429        let mut __struct = Self::default();
32430        __struct.airspeed = buf.get_f32_le();
32431        __struct.groundspeed = buf.get_f32_le();
32432        __struct.alt = buf.get_f32_le();
32433        __struct.climb = buf.get_f32_le();
32434        __struct.heading = buf.get_i16_le();
32435        __struct.throttle = buf.get_u16_le();
32436        Ok(__struct)
32437    }
32438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32439        let mut __tmp = BytesMut::new(bytes);
32440        #[allow(clippy::absurd_extreme_comparisons)]
32441        #[allow(unused_comparisons)]
32442        if __tmp.remaining() < Self::ENCODED_LEN {
32443            panic!(
32444                "buffer is too small (need {} bytes, but got {})",
32445                Self::ENCODED_LEN,
32446                __tmp.remaining(),
32447            )
32448        }
32449        __tmp.put_f32_le(self.airspeed);
32450        __tmp.put_f32_le(self.groundspeed);
32451        __tmp.put_f32_le(self.alt);
32452        __tmp.put_f32_le(self.climb);
32453        __tmp.put_i16_le(self.heading);
32454        __tmp.put_u16_le(self.throttle);
32455        if matches!(version, MavlinkVersion::V2) {
32456            let len = __tmp.len();
32457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32458        } else {
32459            __tmp.len()
32460        }
32461    }
32462}
32463#[doc = "Vibration levels and accelerometer clipping."]
32464#[doc = ""]
32465#[doc = "ID: 241"]
32466#[derive(Debug, Clone, PartialEq)]
32467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32469#[cfg_attr(feature = "ts", derive(TS))]
32470#[cfg_attr(feature = "ts", ts(export))]
32471pub struct VIBRATION_DATA {
32472    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32473    pub time_usec: u64,
32474    #[doc = "Vibration levels on X-axis"]
32475    pub vibration_x: f32,
32476    #[doc = "Vibration levels on Y-axis"]
32477    pub vibration_y: f32,
32478    #[doc = "Vibration levels on Z-axis"]
32479    pub vibration_z: f32,
32480    #[doc = "first accelerometer clipping count"]
32481    pub clipping_0: u32,
32482    #[doc = "second accelerometer clipping count"]
32483    pub clipping_1: u32,
32484    #[doc = "third accelerometer clipping count"]
32485    pub clipping_2: u32,
32486}
32487impl VIBRATION_DATA {
32488    pub const ENCODED_LEN: usize = 32usize;
32489    pub const DEFAULT: Self = Self {
32490        time_usec: 0_u64,
32491        vibration_x: 0.0_f32,
32492        vibration_y: 0.0_f32,
32493        vibration_z: 0.0_f32,
32494        clipping_0: 0_u32,
32495        clipping_1: 0_u32,
32496        clipping_2: 0_u32,
32497    };
32498    #[cfg(feature = "arbitrary")]
32499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32500        use arbitrary::{Arbitrary, Unstructured};
32501        let mut buf = [0u8; 1024];
32502        rng.fill_bytes(&mut buf);
32503        let mut unstructured = Unstructured::new(&buf);
32504        Self::arbitrary(&mut unstructured).unwrap_or_default()
32505    }
32506}
32507impl Default for VIBRATION_DATA {
32508    fn default() -> Self {
32509        Self::DEFAULT.clone()
32510    }
32511}
32512impl MessageData for VIBRATION_DATA {
32513    type Message = MavMessage;
32514    const ID: u32 = 241u32;
32515    const NAME: &'static str = "VIBRATION";
32516    const EXTRA_CRC: u8 = 90u8;
32517    const ENCODED_LEN: usize = 32usize;
32518    fn deser(
32519        _version: MavlinkVersion,
32520        __input: &[u8],
32521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32522        let avail_len = __input.len();
32523        let mut payload_buf = [0; Self::ENCODED_LEN];
32524        let mut buf = if avail_len < Self::ENCODED_LEN {
32525            payload_buf[0..avail_len].copy_from_slice(__input);
32526            Bytes::new(&payload_buf)
32527        } else {
32528            Bytes::new(__input)
32529        };
32530        let mut __struct = Self::default();
32531        __struct.time_usec = buf.get_u64_le();
32532        __struct.vibration_x = buf.get_f32_le();
32533        __struct.vibration_y = buf.get_f32_le();
32534        __struct.vibration_z = buf.get_f32_le();
32535        __struct.clipping_0 = buf.get_u32_le();
32536        __struct.clipping_1 = buf.get_u32_le();
32537        __struct.clipping_2 = buf.get_u32_le();
32538        Ok(__struct)
32539    }
32540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32541        let mut __tmp = BytesMut::new(bytes);
32542        #[allow(clippy::absurd_extreme_comparisons)]
32543        #[allow(unused_comparisons)]
32544        if __tmp.remaining() < Self::ENCODED_LEN {
32545            panic!(
32546                "buffer is too small (need {} bytes, but got {})",
32547                Self::ENCODED_LEN,
32548                __tmp.remaining(),
32549            )
32550        }
32551        __tmp.put_u64_le(self.time_usec);
32552        __tmp.put_f32_le(self.vibration_x);
32553        __tmp.put_f32_le(self.vibration_y);
32554        __tmp.put_f32_le(self.vibration_z);
32555        __tmp.put_u32_le(self.clipping_0);
32556        __tmp.put_u32_le(self.clipping_1);
32557        __tmp.put_u32_le(self.clipping_2);
32558        if matches!(version, MavlinkVersion::V2) {
32559            let len = __tmp.len();
32560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32561        } else {
32562            __tmp.len()
32563        }
32564    }
32565}
32566#[doc = "Global position estimate from a Vicon motion system source."]
32567#[doc = ""]
32568#[doc = "ID: 104"]
32569#[derive(Debug, Clone, PartialEq)]
32570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32572#[cfg_attr(feature = "ts", derive(TS))]
32573#[cfg_attr(feature = "ts", ts(export))]
32574pub struct VICON_POSITION_ESTIMATE_DATA {
32575    #[doc = "Timestamp (UNIX time or time since system boot)"]
32576    pub usec: u64,
32577    #[doc = "Global X position"]
32578    pub x: f32,
32579    #[doc = "Global Y position"]
32580    pub y: f32,
32581    #[doc = "Global Z position"]
32582    pub z: f32,
32583    #[doc = "Roll angle"]
32584    pub roll: f32,
32585    #[doc = "Pitch angle"]
32586    pub pitch: f32,
32587    #[doc = "Yaw angle"]
32588    pub yaw: f32,
32589    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32592    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32593    pub covariance: [f32; 21],
32594}
32595impl VICON_POSITION_ESTIMATE_DATA {
32596    pub const ENCODED_LEN: usize = 116usize;
32597    pub const DEFAULT: Self = Self {
32598        usec: 0_u64,
32599        x: 0.0_f32,
32600        y: 0.0_f32,
32601        z: 0.0_f32,
32602        roll: 0.0_f32,
32603        pitch: 0.0_f32,
32604        yaw: 0.0_f32,
32605        covariance: [0.0_f32; 21usize],
32606    };
32607    #[cfg(feature = "arbitrary")]
32608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32609        use arbitrary::{Arbitrary, Unstructured};
32610        let mut buf = [0u8; 1024];
32611        rng.fill_bytes(&mut buf);
32612        let mut unstructured = Unstructured::new(&buf);
32613        Self::arbitrary(&mut unstructured).unwrap_or_default()
32614    }
32615}
32616impl Default for VICON_POSITION_ESTIMATE_DATA {
32617    fn default() -> Self {
32618        Self::DEFAULT.clone()
32619    }
32620}
32621impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32622    type Message = MavMessage;
32623    const ID: u32 = 104u32;
32624    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32625    const EXTRA_CRC: u8 = 56u8;
32626    const ENCODED_LEN: usize = 116usize;
32627    fn deser(
32628        _version: MavlinkVersion,
32629        __input: &[u8],
32630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32631        let avail_len = __input.len();
32632        let mut payload_buf = [0; Self::ENCODED_LEN];
32633        let mut buf = if avail_len < Self::ENCODED_LEN {
32634            payload_buf[0..avail_len].copy_from_slice(__input);
32635            Bytes::new(&payload_buf)
32636        } else {
32637            Bytes::new(__input)
32638        };
32639        let mut __struct = Self::default();
32640        __struct.usec = buf.get_u64_le();
32641        __struct.x = buf.get_f32_le();
32642        __struct.y = buf.get_f32_le();
32643        __struct.z = buf.get_f32_le();
32644        __struct.roll = buf.get_f32_le();
32645        __struct.pitch = buf.get_f32_le();
32646        __struct.yaw = buf.get_f32_le();
32647        for v in &mut __struct.covariance {
32648            let val = buf.get_f32_le();
32649            *v = val;
32650        }
32651        Ok(__struct)
32652    }
32653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32654        let mut __tmp = BytesMut::new(bytes);
32655        #[allow(clippy::absurd_extreme_comparisons)]
32656        #[allow(unused_comparisons)]
32657        if __tmp.remaining() < Self::ENCODED_LEN {
32658            panic!(
32659                "buffer is too small (need {} bytes, but got {})",
32660                Self::ENCODED_LEN,
32661                __tmp.remaining(),
32662            )
32663        }
32664        __tmp.put_u64_le(self.usec);
32665        __tmp.put_f32_le(self.x);
32666        __tmp.put_f32_le(self.y);
32667        __tmp.put_f32_le(self.z);
32668        __tmp.put_f32_le(self.roll);
32669        __tmp.put_f32_le(self.pitch);
32670        __tmp.put_f32_le(self.yaw);
32671        if matches!(version, MavlinkVersion::V2) {
32672            for val in &self.covariance {
32673                __tmp.put_f32_le(*val);
32674            }
32675            let len = __tmp.len();
32676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32677        } else {
32678            __tmp.len()
32679        }
32680    }
32681}
32682#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32683#[doc = ""]
32684#[doc = "ID: 269"]
32685#[derive(Debug, Clone, PartialEq)]
32686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32688#[cfg_attr(feature = "ts", derive(TS))]
32689#[cfg_attr(feature = "ts", ts(export))]
32690pub struct VIDEO_STREAM_INFORMATION_DATA {
32691    #[doc = "Frame rate."]
32692    pub framerate: f32,
32693    #[doc = "Bit rate."]
32694    pub bitrate: u32,
32695    #[doc = "Bitmap of stream status flags."]
32696    pub flags: VideoStreamStatusFlags,
32697    #[doc = "Horizontal resolution."]
32698    pub resolution_h: u16,
32699    #[doc = "Vertical resolution."]
32700    pub resolution_v: u16,
32701    #[doc = "Video image rotation clockwise."]
32702    pub rotation: u16,
32703    #[doc = "Horizontal Field of view."]
32704    pub hfov: u16,
32705    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32706    pub stream_id: u8,
32707    #[doc = "Number of streams available."]
32708    pub count: u8,
32709    #[doc = "Type of stream."]
32710    pub mavtype: VideoStreamType,
32711    #[doc = "Stream name."]
32712    #[cfg_attr(feature = "ts", ts(type = "string"))]
32713    pub name: CharArray<32>,
32714    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32715    #[cfg_attr(feature = "ts", ts(type = "string"))]
32716    pub uri: CharArray<160>,
32717    #[doc = "Encoding of stream."]
32718    #[cfg_attr(feature = "serde", serde(default))]
32719    pub encoding: VideoStreamEncoding,
32720    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32722    pub camera_device_id: u8,
32723}
32724impl VIDEO_STREAM_INFORMATION_DATA {
32725    pub const ENCODED_LEN: usize = 215usize;
32726    pub const DEFAULT: Self = Self {
32727        framerate: 0.0_f32,
32728        bitrate: 0_u32,
32729        flags: VideoStreamStatusFlags::DEFAULT,
32730        resolution_h: 0_u16,
32731        resolution_v: 0_u16,
32732        rotation: 0_u16,
32733        hfov: 0_u16,
32734        stream_id: 0_u8,
32735        count: 0_u8,
32736        mavtype: VideoStreamType::DEFAULT,
32737        name: CharArray::new([0_u8; 32usize]),
32738        uri: CharArray::new([0_u8; 160usize]),
32739        encoding: VideoStreamEncoding::DEFAULT,
32740        camera_device_id: 0_u8,
32741    };
32742    #[cfg(feature = "arbitrary")]
32743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32744        use arbitrary::{Arbitrary, Unstructured};
32745        let mut buf = [0u8; 1024];
32746        rng.fill_bytes(&mut buf);
32747        let mut unstructured = Unstructured::new(&buf);
32748        Self::arbitrary(&mut unstructured).unwrap_or_default()
32749    }
32750}
32751impl Default for VIDEO_STREAM_INFORMATION_DATA {
32752    fn default() -> Self {
32753        Self::DEFAULT.clone()
32754    }
32755}
32756impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32757    type Message = MavMessage;
32758    const ID: u32 = 269u32;
32759    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32760    const EXTRA_CRC: u8 = 109u8;
32761    const ENCODED_LEN: usize = 215usize;
32762    fn deser(
32763        _version: MavlinkVersion,
32764        __input: &[u8],
32765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32766        let avail_len = __input.len();
32767        let mut payload_buf = [0; Self::ENCODED_LEN];
32768        let mut buf = if avail_len < Self::ENCODED_LEN {
32769            payload_buf[0..avail_len].copy_from_slice(__input);
32770            Bytes::new(&payload_buf)
32771        } else {
32772            Bytes::new(__input)
32773        };
32774        let mut __struct = Self::default();
32775        __struct.framerate = buf.get_f32_le();
32776        __struct.bitrate = buf.get_u32_le();
32777        let tmp = buf.get_u16_le();
32778        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
32779            ::mavlink_core::error::ParserError::InvalidFlag {
32780                flag_type: "VideoStreamStatusFlags",
32781                value: tmp as u64,
32782            },
32783        )?;
32784        __struct.resolution_h = buf.get_u16_le();
32785        __struct.resolution_v = buf.get_u16_le();
32786        __struct.rotation = buf.get_u16_le();
32787        __struct.hfov = buf.get_u16_le();
32788        __struct.stream_id = buf.get_u8();
32789        __struct.count = buf.get_u8();
32790        let tmp = buf.get_u8();
32791        __struct.mavtype =
32792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32793                enum_type: "VideoStreamType",
32794                value: tmp as u64,
32795            })?;
32796        let mut tmp = [0_u8; 32usize];
32797        for v in &mut tmp {
32798            *v = buf.get_u8();
32799        }
32800        __struct.name = CharArray::new(tmp);
32801        let mut tmp = [0_u8; 160usize];
32802        for v in &mut tmp {
32803            *v = buf.get_u8();
32804        }
32805        __struct.uri = CharArray::new(tmp);
32806        let tmp = buf.get_u8();
32807        __struct.encoding =
32808            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32809                enum_type: "VideoStreamEncoding",
32810                value: tmp as u64,
32811            })?;
32812        __struct.camera_device_id = buf.get_u8();
32813        Ok(__struct)
32814    }
32815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32816        let mut __tmp = BytesMut::new(bytes);
32817        #[allow(clippy::absurd_extreme_comparisons)]
32818        #[allow(unused_comparisons)]
32819        if __tmp.remaining() < Self::ENCODED_LEN {
32820            panic!(
32821                "buffer is too small (need {} bytes, but got {})",
32822                Self::ENCODED_LEN,
32823                __tmp.remaining(),
32824            )
32825        }
32826        __tmp.put_f32_le(self.framerate);
32827        __tmp.put_u32_le(self.bitrate);
32828        __tmp.put_u16_le(self.flags.bits());
32829        __tmp.put_u16_le(self.resolution_h);
32830        __tmp.put_u16_le(self.resolution_v);
32831        __tmp.put_u16_le(self.rotation);
32832        __tmp.put_u16_le(self.hfov);
32833        __tmp.put_u8(self.stream_id);
32834        __tmp.put_u8(self.count);
32835        __tmp.put_u8(self.mavtype as u8);
32836        for val in &self.name {
32837            __tmp.put_u8(*val);
32838        }
32839        for val in &self.uri {
32840            __tmp.put_u8(*val);
32841        }
32842        if matches!(version, MavlinkVersion::V2) {
32843            __tmp.put_u8(self.encoding as u8);
32844            __tmp.put_u8(self.camera_device_id);
32845            let len = __tmp.len();
32846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32847        } else {
32848            __tmp.len()
32849        }
32850    }
32851}
32852#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32853#[doc = ""]
32854#[doc = "ID: 270"]
32855#[derive(Debug, Clone, PartialEq)]
32856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32858#[cfg_attr(feature = "ts", derive(TS))]
32859#[cfg_attr(feature = "ts", ts(export))]
32860pub struct VIDEO_STREAM_STATUS_DATA {
32861    #[doc = "Frame rate"]
32862    pub framerate: f32,
32863    #[doc = "Bit rate"]
32864    pub bitrate: u32,
32865    #[doc = "Bitmap of stream status flags"]
32866    pub flags: VideoStreamStatusFlags,
32867    #[doc = "Horizontal resolution"]
32868    pub resolution_h: u16,
32869    #[doc = "Vertical resolution"]
32870    pub resolution_v: u16,
32871    #[doc = "Video image rotation clockwise"]
32872    pub rotation: u16,
32873    #[doc = "Horizontal Field of view"]
32874    pub hfov: u16,
32875    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32876    pub stream_id: u8,
32877    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32878    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32879    pub camera_device_id: u8,
32880}
32881impl VIDEO_STREAM_STATUS_DATA {
32882    pub const ENCODED_LEN: usize = 20usize;
32883    pub const DEFAULT: Self = Self {
32884        framerate: 0.0_f32,
32885        bitrate: 0_u32,
32886        flags: VideoStreamStatusFlags::DEFAULT,
32887        resolution_h: 0_u16,
32888        resolution_v: 0_u16,
32889        rotation: 0_u16,
32890        hfov: 0_u16,
32891        stream_id: 0_u8,
32892        camera_device_id: 0_u8,
32893    };
32894    #[cfg(feature = "arbitrary")]
32895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32896        use arbitrary::{Arbitrary, Unstructured};
32897        let mut buf = [0u8; 1024];
32898        rng.fill_bytes(&mut buf);
32899        let mut unstructured = Unstructured::new(&buf);
32900        Self::arbitrary(&mut unstructured).unwrap_or_default()
32901    }
32902}
32903impl Default for VIDEO_STREAM_STATUS_DATA {
32904    fn default() -> Self {
32905        Self::DEFAULT.clone()
32906    }
32907}
32908impl MessageData for VIDEO_STREAM_STATUS_DATA {
32909    type Message = MavMessage;
32910    const ID: u32 = 270u32;
32911    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32912    const EXTRA_CRC: u8 = 59u8;
32913    const ENCODED_LEN: usize = 20usize;
32914    fn deser(
32915        _version: MavlinkVersion,
32916        __input: &[u8],
32917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32918        let avail_len = __input.len();
32919        let mut payload_buf = [0; Self::ENCODED_LEN];
32920        let mut buf = if avail_len < Self::ENCODED_LEN {
32921            payload_buf[0..avail_len].copy_from_slice(__input);
32922            Bytes::new(&payload_buf)
32923        } else {
32924            Bytes::new(__input)
32925        };
32926        let mut __struct = Self::default();
32927        __struct.framerate = buf.get_f32_le();
32928        __struct.bitrate = buf.get_u32_le();
32929        let tmp = buf.get_u16_le();
32930        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
32931            ::mavlink_core::error::ParserError::InvalidFlag {
32932                flag_type: "VideoStreamStatusFlags",
32933                value: tmp as u64,
32934            },
32935        )?;
32936        __struct.resolution_h = buf.get_u16_le();
32937        __struct.resolution_v = buf.get_u16_le();
32938        __struct.rotation = buf.get_u16_le();
32939        __struct.hfov = buf.get_u16_le();
32940        __struct.stream_id = buf.get_u8();
32941        __struct.camera_device_id = buf.get_u8();
32942        Ok(__struct)
32943    }
32944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32945        let mut __tmp = BytesMut::new(bytes);
32946        #[allow(clippy::absurd_extreme_comparisons)]
32947        #[allow(unused_comparisons)]
32948        if __tmp.remaining() < Self::ENCODED_LEN {
32949            panic!(
32950                "buffer is too small (need {} bytes, but got {})",
32951                Self::ENCODED_LEN,
32952                __tmp.remaining(),
32953            )
32954        }
32955        __tmp.put_f32_le(self.framerate);
32956        __tmp.put_u32_le(self.bitrate);
32957        __tmp.put_u16_le(self.flags.bits());
32958        __tmp.put_u16_le(self.resolution_h);
32959        __tmp.put_u16_le(self.resolution_v);
32960        __tmp.put_u16_le(self.rotation);
32961        __tmp.put_u16_le(self.hfov);
32962        __tmp.put_u8(self.stream_id);
32963        if matches!(version, MavlinkVersion::V2) {
32964            __tmp.put_u8(self.camera_device_id);
32965            let len = __tmp.len();
32966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32967        } else {
32968            __tmp.len()
32969        }
32970    }
32971}
32972#[doc = "Local position/attitude estimate from a vision source."]
32973#[doc = ""]
32974#[doc = "ID: 102"]
32975#[derive(Debug, Clone, PartialEq)]
32976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32978#[cfg_attr(feature = "ts", derive(TS))]
32979#[cfg_attr(feature = "ts", ts(export))]
32980pub struct VISION_POSITION_ESTIMATE_DATA {
32981    #[doc = "Timestamp (UNIX time or time since system boot)"]
32982    pub usec: u64,
32983    #[doc = "Local X position"]
32984    pub x: f32,
32985    #[doc = "Local Y position"]
32986    pub y: f32,
32987    #[doc = "Local Z position"]
32988    pub z: f32,
32989    #[doc = "Roll angle"]
32990    pub roll: f32,
32991    #[doc = "Pitch angle"]
32992    pub pitch: f32,
32993    #[doc = "Yaw angle"]
32994    pub yaw: f32,
32995    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32996    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32998    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32999    pub covariance: [f32; 21],
33000    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33002    pub reset_counter: u8,
33003}
33004impl VISION_POSITION_ESTIMATE_DATA {
33005    pub const ENCODED_LEN: usize = 117usize;
33006    pub const DEFAULT: Self = Self {
33007        usec: 0_u64,
33008        x: 0.0_f32,
33009        y: 0.0_f32,
33010        z: 0.0_f32,
33011        roll: 0.0_f32,
33012        pitch: 0.0_f32,
33013        yaw: 0.0_f32,
33014        covariance: [0.0_f32; 21usize],
33015        reset_counter: 0_u8,
33016    };
33017    #[cfg(feature = "arbitrary")]
33018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33019        use arbitrary::{Arbitrary, Unstructured};
33020        let mut buf = [0u8; 1024];
33021        rng.fill_bytes(&mut buf);
33022        let mut unstructured = Unstructured::new(&buf);
33023        Self::arbitrary(&mut unstructured).unwrap_or_default()
33024    }
33025}
33026impl Default for VISION_POSITION_ESTIMATE_DATA {
33027    fn default() -> Self {
33028        Self::DEFAULT.clone()
33029    }
33030}
33031impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33032    type Message = MavMessage;
33033    const ID: u32 = 102u32;
33034    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33035    const EXTRA_CRC: u8 = 158u8;
33036    const ENCODED_LEN: usize = 117usize;
33037    fn deser(
33038        _version: MavlinkVersion,
33039        __input: &[u8],
33040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33041        let avail_len = __input.len();
33042        let mut payload_buf = [0; Self::ENCODED_LEN];
33043        let mut buf = if avail_len < Self::ENCODED_LEN {
33044            payload_buf[0..avail_len].copy_from_slice(__input);
33045            Bytes::new(&payload_buf)
33046        } else {
33047            Bytes::new(__input)
33048        };
33049        let mut __struct = Self::default();
33050        __struct.usec = buf.get_u64_le();
33051        __struct.x = buf.get_f32_le();
33052        __struct.y = buf.get_f32_le();
33053        __struct.z = buf.get_f32_le();
33054        __struct.roll = buf.get_f32_le();
33055        __struct.pitch = buf.get_f32_le();
33056        __struct.yaw = buf.get_f32_le();
33057        for v in &mut __struct.covariance {
33058            let val = buf.get_f32_le();
33059            *v = val;
33060        }
33061        __struct.reset_counter = buf.get_u8();
33062        Ok(__struct)
33063    }
33064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33065        let mut __tmp = BytesMut::new(bytes);
33066        #[allow(clippy::absurd_extreme_comparisons)]
33067        #[allow(unused_comparisons)]
33068        if __tmp.remaining() < Self::ENCODED_LEN {
33069            panic!(
33070                "buffer is too small (need {} bytes, but got {})",
33071                Self::ENCODED_LEN,
33072                __tmp.remaining(),
33073            )
33074        }
33075        __tmp.put_u64_le(self.usec);
33076        __tmp.put_f32_le(self.x);
33077        __tmp.put_f32_le(self.y);
33078        __tmp.put_f32_le(self.z);
33079        __tmp.put_f32_le(self.roll);
33080        __tmp.put_f32_le(self.pitch);
33081        __tmp.put_f32_le(self.yaw);
33082        if matches!(version, MavlinkVersion::V2) {
33083            for val in &self.covariance {
33084                __tmp.put_f32_le(*val);
33085            }
33086            __tmp.put_u8(self.reset_counter);
33087            let len = __tmp.len();
33088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33089        } else {
33090            __tmp.len()
33091        }
33092    }
33093}
33094#[doc = "Speed estimate from a vision source."]
33095#[doc = ""]
33096#[doc = "ID: 103"]
33097#[derive(Debug, Clone, PartialEq)]
33098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33100#[cfg_attr(feature = "ts", derive(TS))]
33101#[cfg_attr(feature = "ts", ts(export))]
33102pub struct VISION_SPEED_ESTIMATE_DATA {
33103    #[doc = "Timestamp (UNIX time or time since system boot)"]
33104    pub usec: u64,
33105    #[doc = "Global X speed"]
33106    pub x: f32,
33107    #[doc = "Global Y speed"]
33108    pub y: f32,
33109    #[doc = "Global Z speed"]
33110    pub z: f32,
33111    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33113    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33114    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33115    pub covariance: [f32; 9],
33116    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33117    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33118    pub reset_counter: u8,
33119}
33120impl VISION_SPEED_ESTIMATE_DATA {
33121    pub const ENCODED_LEN: usize = 57usize;
33122    pub const DEFAULT: Self = Self {
33123        usec: 0_u64,
33124        x: 0.0_f32,
33125        y: 0.0_f32,
33126        z: 0.0_f32,
33127        covariance: [0.0_f32; 9usize],
33128        reset_counter: 0_u8,
33129    };
33130    #[cfg(feature = "arbitrary")]
33131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33132        use arbitrary::{Arbitrary, Unstructured};
33133        let mut buf = [0u8; 1024];
33134        rng.fill_bytes(&mut buf);
33135        let mut unstructured = Unstructured::new(&buf);
33136        Self::arbitrary(&mut unstructured).unwrap_or_default()
33137    }
33138}
33139impl Default for VISION_SPEED_ESTIMATE_DATA {
33140    fn default() -> Self {
33141        Self::DEFAULT.clone()
33142    }
33143}
33144impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33145    type Message = MavMessage;
33146    const ID: u32 = 103u32;
33147    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33148    const EXTRA_CRC: u8 = 208u8;
33149    const ENCODED_LEN: usize = 57usize;
33150    fn deser(
33151        _version: MavlinkVersion,
33152        __input: &[u8],
33153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33154        let avail_len = __input.len();
33155        let mut payload_buf = [0; Self::ENCODED_LEN];
33156        let mut buf = if avail_len < Self::ENCODED_LEN {
33157            payload_buf[0..avail_len].copy_from_slice(__input);
33158            Bytes::new(&payload_buf)
33159        } else {
33160            Bytes::new(__input)
33161        };
33162        let mut __struct = Self::default();
33163        __struct.usec = buf.get_u64_le();
33164        __struct.x = buf.get_f32_le();
33165        __struct.y = buf.get_f32_le();
33166        __struct.z = buf.get_f32_le();
33167        for v in &mut __struct.covariance {
33168            let val = buf.get_f32_le();
33169            *v = val;
33170        }
33171        __struct.reset_counter = buf.get_u8();
33172        Ok(__struct)
33173    }
33174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33175        let mut __tmp = BytesMut::new(bytes);
33176        #[allow(clippy::absurd_extreme_comparisons)]
33177        #[allow(unused_comparisons)]
33178        if __tmp.remaining() < Self::ENCODED_LEN {
33179            panic!(
33180                "buffer is too small (need {} bytes, but got {})",
33181                Self::ENCODED_LEN,
33182                __tmp.remaining(),
33183            )
33184        }
33185        __tmp.put_u64_le(self.usec);
33186        __tmp.put_f32_le(self.x);
33187        __tmp.put_f32_le(self.y);
33188        __tmp.put_f32_le(self.z);
33189        if matches!(version, MavlinkVersion::V2) {
33190            for val in &self.covariance {
33191                __tmp.put_f32_le(*val);
33192            }
33193            __tmp.put_u8(self.reset_counter);
33194            let len = __tmp.len();
33195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33196        } else {
33197            __tmp.len()
33198        }
33199    }
33200}
33201#[doc = "Cumulative distance traveled for each reported wheel."]
33202#[doc = ""]
33203#[doc = "ID: 9000"]
33204#[derive(Debug, Clone, PartialEq)]
33205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33207#[cfg_attr(feature = "ts", derive(TS))]
33208#[cfg_attr(feature = "ts", ts(export))]
33209pub struct WHEEL_DISTANCE_DATA {
33210    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33211    pub time_usec: u64,
33212    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33215    pub distance: [f64; 16],
33216    #[doc = "Number of wheels reported."]
33217    pub count: u8,
33218}
33219impl WHEEL_DISTANCE_DATA {
33220    pub const ENCODED_LEN: usize = 137usize;
33221    pub const DEFAULT: Self = Self {
33222        time_usec: 0_u64,
33223        distance: [0.0_f64; 16usize],
33224        count: 0_u8,
33225    };
33226    #[cfg(feature = "arbitrary")]
33227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33228        use arbitrary::{Arbitrary, Unstructured};
33229        let mut buf = [0u8; 1024];
33230        rng.fill_bytes(&mut buf);
33231        let mut unstructured = Unstructured::new(&buf);
33232        Self::arbitrary(&mut unstructured).unwrap_or_default()
33233    }
33234}
33235impl Default for WHEEL_DISTANCE_DATA {
33236    fn default() -> Self {
33237        Self::DEFAULT.clone()
33238    }
33239}
33240impl MessageData for WHEEL_DISTANCE_DATA {
33241    type Message = MavMessage;
33242    const ID: u32 = 9000u32;
33243    const NAME: &'static str = "WHEEL_DISTANCE";
33244    const EXTRA_CRC: u8 = 113u8;
33245    const ENCODED_LEN: usize = 137usize;
33246    fn deser(
33247        _version: MavlinkVersion,
33248        __input: &[u8],
33249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33250        let avail_len = __input.len();
33251        let mut payload_buf = [0; Self::ENCODED_LEN];
33252        let mut buf = if avail_len < Self::ENCODED_LEN {
33253            payload_buf[0..avail_len].copy_from_slice(__input);
33254            Bytes::new(&payload_buf)
33255        } else {
33256            Bytes::new(__input)
33257        };
33258        let mut __struct = Self::default();
33259        __struct.time_usec = buf.get_u64_le();
33260        for v in &mut __struct.distance {
33261            let val = buf.get_f64_le();
33262            *v = val;
33263        }
33264        __struct.count = buf.get_u8();
33265        Ok(__struct)
33266    }
33267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33268        let mut __tmp = BytesMut::new(bytes);
33269        #[allow(clippy::absurd_extreme_comparisons)]
33270        #[allow(unused_comparisons)]
33271        if __tmp.remaining() < Self::ENCODED_LEN {
33272            panic!(
33273                "buffer is too small (need {} bytes, but got {})",
33274                Self::ENCODED_LEN,
33275                __tmp.remaining(),
33276            )
33277        }
33278        __tmp.put_u64_le(self.time_usec);
33279        for val in &self.distance {
33280            __tmp.put_f64_le(*val);
33281        }
33282        __tmp.put_u8(self.count);
33283        if matches!(version, MavlinkVersion::V2) {
33284            let len = __tmp.len();
33285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33286        } else {
33287            __tmp.len()
33288        }
33289    }
33290}
33291#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33292#[doc = ""]
33293#[doc = "ID: 299"]
33294#[derive(Debug, Clone, PartialEq)]
33295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33297#[cfg_attr(feature = "ts", derive(TS))]
33298#[cfg_attr(feature = "ts", ts(export))]
33299pub struct WIFI_CONFIG_AP_DATA {
33300    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33301    #[cfg_attr(feature = "ts", ts(type = "string"))]
33302    pub ssid: CharArray<32>,
33303    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33304    #[cfg_attr(feature = "ts", ts(type = "string"))]
33305    pub password: CharArray<64>,
33306    #[doc = "WiFi Mode."]
33307    #[cfg_attr(feature = "serde", serde(default))]
33308    pub mode: WifiConfigApMode,
33309    #[doc = "Message acceptance response (sent back to GS)."]
33310    #[cfg_attr(feature = "serde", serde(default))]
33311    pub response: WifiConfigApResponse,
33312}
33313impl WIFI_CONFIG_AP_DATA {
33314    pub const ENCODED_LEN: usize = 98usize;
33315    pub const DEFAULT: Self = Self {
33316        ssid: CharArray::new([0_u8; 32usize]),
33317        password: CharArray::new([0_u8; 64usize]),
33318        mode: WifiConfigApMode::DEFAULT,
33319        response: WifiConfigApResponse::DEFAULT,
33320    };
33321    #[cfg(feature = "arbitrary")]
33322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33323        use arbitrary::{Arbitrary, Unstructured};
33324        let mut buf = [0u8; 1024];
33325        rng.fill_bytes(&mut buf);
33326        let mut unstructured = Unstructured::new(&buf);
33327        Self::arbitrary(&mut unstructured).unwrap_or_default()
33328    }
33329}
33330impl Default for WIFI_CONFIG_AP_DATA {
33331    fn default() -> Self {
33332        Self::DEFAULT.clone()
33333    }
33334}
33335impl MessageData for WIFI_CONFIG_AP_DATA {
33336    type Message = MavMessage;
33337    const ID: u32 = 299u32;
33338    const NAME: &'static str = "WIFI_CONFIG_AP";
33339    const EXTRA_CRC: u8 = 19u8;
33340    const ENCODED_LEN: usize = 98usize;
33341    fn deser(
33342        _version: MavlinkVersion,
33343        __input: &[u8],
33344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33345        let avail_len = __input.len();
33346        let mut payload_buf = [0; Self::ENCODED_LEN];
33347        let mut buf = if avail_len < Self::ENCODED_LEN {
33348            payload_buf[0..avail_len].copy_from_slice(__input);
33349            Bytes::new(&payload_buf)
33350        } else {
33351            Bytes::new(__input)
33352        };
33353        let mut __struct = Self::default();
33354        let mut tmp = [0_u8; 32usize];
33355        for v in &mut tmp {
33356            *v = buf.get_u8();
33357        }
33358        __struct.ssid = CharArray::new(tmp);
33359        let mut tmp = [0_u8; 64usize];
33360        for v in &mut tmp {
33361            *v = buf.get_u8();
33362        }
33363        __struct.password = CharArray::new(tmp);
33364        let tmp = buf.get_i8();
33365        __struct.mode =
33366            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33367                enum_type: "WifiConfigApMode",
33368                value: tmp as u64,
33369            })?;
33370        let tmp = buf.get_i8();
33371        __struct.response =
33372            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33373                enum_type: "WifiConfigApResponse",
33374                value: tmp as u64,
33375            })?;
33376        Ok(__struct)
33377    }
33378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33379        let mut __tmp = BytesMut::new(bytes);
33380        #[allow(clippy::absurd_extreme_comparisons)]
33381        #[allow(unused_comparisons)]
33382        if __tmp.remaining() < Self::ENCODED_LEN {
33383            panic!(
33384                "buffer is too small (need {} bytes, but got {})",
33385                Self::ENCODED_LEN,
33386                __tmp.remaining(),
33387            )
33388        }
33389        for val in &self.ssid {
33390            __tmp.put_u8(*val);
33391        }
33392        for val in &self.password {
33393            __tmp.put_u8(*val);
33394        }
33395        if matches!(version, MavlinkVersion::V2) {
33396            __tmp.put_i8(self.mode as i8);
33397            __tmp.put_i8(self.response as i8);
33398            let len = __tmp.len();
33399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33400        } else {
33401            __tmp.len()
33402        }
33403    }
33404}
33405#[doc = "Winch status."]
33406#[doc = ""]
33407#[doc = "ID: 9005"]
33408#[derive(Debug, Clone, PartialEq)]
33409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33411#[cfg_attr(feature = "ts", derive(TS))]
33412#[cfg_attr(feature = "ts", ts(export))]
33413pub struct WINCH_STATUS_DATA {
33414    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33415    pub time_usec: u64,
33416    #[doc = "Length of line released. NaN if unknown"]
33417    pub line_length: f32,
33418    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33419    pub speed: f32,
33420    #[doc = "Tension on the line. NaN if unknown"]
33421    pub tension: f32,
33422    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33423    pub voltage: f32,
33424    #[doc = "Current draw from the winch. NaN if unknown"]
33425    pub current: f32,
33426    #[doc = "Status flags"]
33427    pub status: MavWinchStatusFlag,
33428    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33429    pub temperature: i16,
33430}
33431impl WINCH_STATUS_DATA {
33432    pub const ENCODED_LEN: usize = 34usize;
33433    pub const DEFAULT: Self = Self {
33434        time_usec: 0_u64,
33435        line_length: 0.0_f32,
33436        speed: 0.0_f32,
33437        tension: 0.0_f32,
33438        voltage: 0.0_f32,
33439        current: 0.0_f32,
33440        status: MavWinchStatusFlag::DEFAULT,
33441        temperature: 0_i16,
33442    };
33443    #[cfg(feature = "arbitrary")]
33444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33445        use arbitrary::{Arbitrary, Unstructured};
33446        let mut buf = [0u8; 1024];
33447        rng.fill_bytes(&mut buf);
33448        let mut unstructured = Unstructured::new(&buf);
33449        Self::arbitrary(&mut unstructured).unwrap_or_default()
33450    }
33451}
33452impl Default for WINCH_STATUS_DATA {
33453    fn default() -> Self {
33454        Self::DEFAULT.clone()
33455    }
33456}
33457impl MessageData for WINCH_STATUS_DATA {
33458    type Message = MavMessage;
33459    const ID: u32 = 9005u32;
33460    const NAME: &'static str = "WINCH_STATUS";
33461    const EXTRA_CRC: u8 = 117u8;
33462    const ENCODED_LEN: usize = 34usize;
33463    fn deser(
33464        _version: MavlinkVersion,
33465        __input: &[u8],
33466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33467        let avail_len = __input.len();
33468        let mut payload_buf = [0; Self::ENCODED_LEN];
33469        let mut buf = if avail_len < Self::ENCODED_LEN {
33470            payload_buf[0..avail_len].copy_from_slice(__input);
33471            Bytes::new(&payload_buf)
33472        } else {
33473            Bytes::new(__input)
33474        };
33475        let mut __struct = Self::default();
33476        __struct.time_usec = buf.get_u64_le();
33477        __struct.line_length = buf.get_f32_le();
33478        __struct.speed = buf.get_f32_le();
33479        __struct.tension = buf.get_f32_le();
33480        __struct.voltage = buf.get_f32_le();
33481        __struct.current = buf.get_f32_le();
33482        let tmp = buf.get_u32_le();
33483        __struct.status = MavWinchStatusFlag::from_bits(tmp).ok_or(
33484            ::mavlink_core::error::ParserError::InvalidFlag {
33485                flag_type: "MavWinchStatusFlag",
33486                value: tmp as u64,
33487            },
33488        )?;
33489        __struct.temperature = buf.get_i16_le();
33490        Ok(__struct)
33491    }
33492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33493        let mut __tmp = BytesMut::new(bytes);
33494        #[allow(clippy::absurd_extreme_comparisons)]
33495        #[allow(unused_comparisons)]
33496        if __tmp.remaining() < Self::ENCODED_LEN {
33497            panic!(
33498                "buffer is too small (need {} bytes, but got {})",
33499                Self::ENCODED_LEN,
33500                __tmp.remaining(),
33501            )
33502        }
33503        __tmp.put_u64_le(self.time_usec);
33504        __tmp.put_f32_le(self.line_length);
33505        __tmp.put_f32_le(self.speed);
33506        __tmp.put_f32_le(self.tension);
33507        __tmp.put_f32_le(self.voltage);
33508        __tmp.put_f32_le(self.current);
33509        __tmp.put_u32_le(self.status.bits());
33510        __tmp.put_i16_le(self.temperature);
33511        if matches!(version, MavlinkVersion::V2) {
33512            let len = __tmp.len();
33513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33514        } else {
33515            __tmp.len()
33516        }
33517    }
33518}
33519#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33520#[doc = ""]
33521#[doc = "ID: 231"]
33522#[derive(Debug, Clone, PartialEq)]
33523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33525#[cfg_attr(feature = "ts", derive(TS))]
33526#[cfg_attr(feature = "ts", ts(export))]
33527pub struct WIND_COV_DATA {
33528    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33529    pub time_usec: u64,
33530    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33531    pub wind_x: f32,
33532    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33533    pub wind_y: f32,
33534    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33535    pub wind_z: f32,
33536    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33537    pub var_horiz: f32,
33538    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33539    pub var_vert: f32,
33540    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33541    pub wind_alt: f32,
33542    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33543    pub horiz_accuracy: f32,
33544    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33545    pub vert_accuracy: f32,
33546}
33547impl WIND_COV_DATA {
33548    pub const ENCODED_LEN: usize = 40usize;
33549    pub const DEFAULT: Self = Self {
33550        time_usec: 0_u64,
33551        wind_x: 0.0_f32,
33552        wind_y: 0.0_f32,
33553        wind_z: 0.0_f32,
33554        var_horiz: 0.0_f32,
33555        var_vert: 0.0_f32,
33556        wind_alt: 0.0_f32,
33557        horiz_accuracy: 0.0_f32,
33558        vert_accuracy: 0.0_f32,
33559    };
33560    #[cfg(feature = "arbitrary")]
33561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33562        use arbitrary::{Arbitrary, Unstructured};
33563        let mut buf = [0u8; 1024];
33564        rng.fill_bytes(&mut buf);
33565        let mut unstructured = Unstructured::new(&buf);
33566        Self::arbitrary(&mut unstructured).unwrap_or_default()
33567    }
33568}
33569impl Default for WIND_COV_DATA {
33570    fn default() -> Self {
33571        Self::DEFAULT.clone()
33572    }
33573}
33574impl MessageData for WIND_COV_DATA {
33575    type Message = MavMessage;
33576    const ID: u32 = 231u32;
33577    const NAME: &'static str = "WIND_COV";
33578    const EXTRA_CRC: u8 = 105u8;
33579    const ENCODED_LEN: usize = 40usize;
33580    fn deser(
33581        _version: MavlinkVersion,
33582        __input: &[u8],
33583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33584        let avail_len = __input.len();
33585        let mut payload_buf = [0; Self::ENCODED_LEN];
33586        let mut buf = if avail_len < Self::ENCODED_LEN {
33587            payload_buf[0..avail_len].copy_from_slice(__input);
33588            Bytes::new(&payload_buf)
33589        } else {
33590            Bytes::new(__input)
33591        };
33592        let mut __struct = Self::default();
33593        __struct.time_usec = buf.get_u64_le();
33594        __struct.wind_x = buf.get_f32_le();
33595        __struct.wind_y = buf.get_f32_le();
33596        __struct.wind_z = buf.get_f32_le();
33597        __struct.var_horiz = buf.get_f32_le();
33598        __struct.var_vert = buf.get_f32_le();
33599        __struct.wind_alt = buf.get_f32_le();
33600        __struct.horiz_accuracy = buf.get_f32_le();
33601        __struct.vert_accuracy = buf.get_f32_le();
33602        Ok(__struct)
33603    }
33604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33605        let mut __tmp = BytesMut::new(bytes);
33606        #[allow(clippy::absurd_extreme_comparisons)]
33607        #[allow(unused_comparisons)]
33608        if __tmp.remaining() < Self::ENCODED_LEN {
33609            panic!(
33610                "buffer is too small (need {} bytes, but got {})",
33611                Self::ENCODED_LEN,
33612                __tmp.remaining(),
33613            )
33614        }
33615        __tmp.put_u64_le(self.time_usec);
33616        __tmp.put_f32_le(self.wind_x);
33617        __tmp.put_f32_le(self.wind_y);
33618        __tmp.put_f32_le(self.wind_z);
33619        __tmp.put_f32_le(self.var_horiz);
33620        __tmp.put_f32_le(self.var_vert);
33621        __tmp.put_f32_le(self.wind_alt);
33622        __tmp.put_f32_le(self.horiz_accuracy);
33623        __tmp.put_f32_le(self.vert_accuracy);
33624        if matches!(version, MavlinkVersion::V2) {
33625            let len = __tmp.len();
33626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33627        } else {
33628            __tmp.len()
33629        }
33630    }
33631}
33632#[derive(Clone, PartialEq, Debug)]
33633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33634#[cfg_attr(feature = "serde", serde(tag = "type"))]
33635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33636#[cfg_attr(feature = "ts", derive(TS))]
33637#[cfg_attr(feature = "ts", ts(export))]
33638#[repr(u32)]
33639pub enum MavMessage {
33640    #[doc = "Set the vehicle attitude and body angular rates."]
33641    #[doc = ""]
33642    #[doc = "ID: 140"]
33643    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33644    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33645    #[doc = ""]
33646    #[doc = "ID: 375"]
33647    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33648    #[doc = "The location and information of an ADSB vehicle."]
33649    #[doc = ""]
33650    #[doc = "ID: 246"]
33651    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33652    #[doc = "Airspeed information from a sensor."]
33653    #[doc = ""]
33654    #[doc = "ID: 295"]
33655    AIRSPEED(AIRSPEED_DATA),
33656    #[doc = "The location and information of an AIS vessel."]
33657    #[doc = ""]
33658    #[doc = "ID: 301"]
33659    AIS_VESSEL(AIS_VESSEL_DATA),
33660    #[doc = "The current system altitude."]
33661    #[doc = ""]
33662    #[doc = "ID: 141"]
33663    ALTITUDE(ALTITUDE_DATA),
33664    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33665    #[doc = ""]
33666    #[doc = "ID: 30"]
33667    ATTITUDE(ATTITUDE_DATA),
33668    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33669    #[doc = ""]
33670    #[doc = "ID: 31"]
33671    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33672    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33673    #[doc = ""]
33674    #[doc = "ID: 61"]
33675    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33676    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33677    #[doc = ""]
33678    #[doc = "ID: 83"]
33679    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33680    #[doc = "Motion capture attitude and position."]
33681    #[doc = ""]
33682    #[doc = "ID: 138"]
33683    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33684    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33685    #[doc = ""]
33686    #[doc = "ID: 7"]
33687    AUTH_KEY(AUTH_KEY_DATA),
33688    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33689    #[doc = ""]
33690    #[doc = "ID: 286"]
33691    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33692    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33693    #[doc = ""]
33694    #[doc = "ID: 148"]
33695    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33696    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33697    #[doc = ""]
33698    #[doc = "ID: 435"]
33699    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33700    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33701    #[doc = ""]
33702    #[doc = "ID: 437"]
33703    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33704    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33705    #[doc = ""]
33706    #[doc = "ID: 372"]
33707    BATTERY_INFO(BATTERY_INFO_DATA),
33708    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33709    #[doc = ""]
33710    #[doc = "ID: 147"]
33711    BATTERY_STATUS(BATTERY_STATUS_DATA),
33712    #[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
33713    #[doc = ""]
33714    #[doc = "ID: 369"]
33715    BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA),
33716    #[doc = "Report button state change."]
33717    #[doc = ""]
33718    #[doc = "ID: 257"]
33719    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33720    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33721    #[doc = ""]
33722    #[doc = "ID: 262"]
33723    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33724    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33725    #[doc = ""]
33726    #[doc = "ID: 271"]
33727    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33728    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33729    #[doc = ""]
33730    #[doc = "ID: 263"]
33731    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33732    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33733    #[doc = ""]
33734    #[doc = "ID: 259"]
33735    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33736    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33737    #[doc = ""]
33738    #[doc = "ID: 260"]
33739    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33740    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33741    #[doc = ""]
33742    #[doc = "ID: 277"]
33743    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33744    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33745    #[doc = ""]
33746    #[doc = "ID: 276"]
33747    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33748    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33749    #[doc = ""]
33750    #[doc = "ID: 275"]
33751    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33752    #[doc = "Camera-IMU triggering and synchronisation message."]
33753    #[doc = ""]
33754    #[doc = "ID: 112"]
33755    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33756    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33757    #[doc = ""]
33758    #[doc = "ID: 387"]
33759    CANFD_FRAME(CANFD_FRAME_DATA),
33760    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33761    #[doc = ""]
33762    #[doc = "ID: 388"]
33763    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33764    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33765    #[doc = ""]
33766    #[doc = "ID: 386"]
33767    CAN_FRAME(CAN_FRAME_DATA),
33768    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33769    #[doc = ""]
33770    #[doc = "ID: 336"]
33771    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33772    #[doc = "Report current used cellular network status."]
33773    #[doc = ""]
33774    #[doc = "ID: 334"]
33775    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33776    #[doc = "Request to control this MAV."]
33777    #[doc = ""]
33778    #[doc = "ID: 5"]
33779    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33780    #[doc = "Accept / deny control of this MAV."]
33781    #[doc = ""]
33782    #[doc = "ID: 6"]
33783    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33784    #[doc = "Information about a potential collision."]
33785    #[doc = ""]
33786    #[doc = "ID: 247"]
33787    COLLISION(COLLISION_DATA),
33788    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33789    #[doc = ""]
33790    #[doc = "ID: 77"]
33791    COMMAND_ACK(COMMAND_ACK_DATA),
33792    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33793    #[doc = ""]
33794    #[doc = "ID: 80"]
33795    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33796    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33797    #[doc = ""]
33798    #[doc = "ID: 75"]
33799    COMMAND_INT(COMMAND_INT_DATA),
33800    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33801    #[doc = ""]
33802    #[doc = "ID: 76"]
33803    COMMAND_LONG(COMMAND_LONG_DATA),
33804    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33805    #[doc = ""]
33806    #[doc = "ID: 395"]
33807    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33808    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33809    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33810    #[doc = ""]
33811    #[doc = "ID: 396"]
33812    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33813    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33814    #[doc = ""]
33815    #[doc = "ID: 397"]
33816    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33817    #[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
33818    #[doc = ""]
33819    #[doc = "ID: 512"]
33820    CONTROL_STATUS(CONTROL_STATUS_DATA),
33821    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33822    #[doc = ""]
33823    #[doc = "ID: 146"]
33824    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33825    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33826    #[doc = ""]
33827    #[doc = "ID: 411"]
33828    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33829    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33830    #[doc = ""]
33831    #[doc = "ID: 436"]
33832    CURRENT_MODE(CURRENT_MODE_DATA),
33833    #[doc = "Data stream status information."]
33834    #[doc = ""]
33835    #[doc = "ID: 67"]
33836    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33837    DATA_STREAM(DATA_STREAM_DATA),
33838    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33839    #[doc = ""]
33840    #[doc = "ID: 130"]
33841    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33842    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33843    #[doc = ""]
33844    #[doc = "ID: 254"]
33845    DEBUG(DEBUG_DATA),
33846    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33847    #[doc = ""]
33848    #[doc = "ID: 350"]
33849    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33850    #[doc = "To debug something using a named 3D vector."]
33851    #[doc = ""]
33852    #[doc = "ID: 250"]
33853    DEBUG_VECT(DEBUG_VECT_DATA),
33854    #[doc = "Distance sensor information for an onboard rangefinder."]
33855    #[doc = ""]
33856    #[doc = "ID: 132"]
33857    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33858    #[doc = "EFI status output."]
33859    #[doc = ""]
33860    #[doc = "ID: 225"]
33861    EFI_STATUS(EFI_STATUS_DATA),
33862    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33863    #[doc = ""]
33864    #[doc = "ID: 131"]
33865    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33866    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33867    #[doc = ""]
33868    #[doc = "ID: 290"]
33869    ESC_INFO(ESC_INFO_DATA),
33870    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33871    #[doc = ""]
33872    #[doc = "ID: 291"]
33873    ESC_STATUS(ESC_STATUS_DATA),
33874    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33875    #[doc = ""]
33876    #[doc = "ID: 230"]
33877    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33878    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33879    #[doc = ""]
33880    #[doc = "ID: 410"]
33881    EVENT(EVENT_DATA),
33882    #[doc = "Provides state for additional features."]
33883    #[doc = ""]
33884    #[doc = "ID: 245"]
33885    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33886    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33887    #[doc = ""]
33888    #[doc = "ID: 162"]
33889    FENCE_STATUS(FENCE_STATUS_DATA),
33890    #[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
33891    #[doc = ""]
33892    #[doc = "ID: 361"]
33893    FIGURE_EIGHT_EXECUTION_STATUS(FIGURE_EIGHT_EXECUTION_STATUS_DATA),
33894    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33895    #[doc = ""]
33896    #[doc = "ID: 110"]
33897    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33898    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33899    #[doc = ""]
33900    #[doc = "ID: 264"]
33901    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33902    #[doc = "Current motion information from a designated system."]
33903    #[doc = ""]
33904    #[doc = "ID: 144"]
33905    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33906    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33907    #[doc = ""]
33908    #[doc = "ID: 371"]
33909    FUEL_STATUS(FUEL_STATUS_DATA),
33910    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33911    #[doc = ""]
33912    #[doc = "ID: 373"]
33913    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33914    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33915    #[doc = ""]
33916    #[doc = "ID: 285"]
33917    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33918    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33919    #[doc = ""]
33920    #[doc = "ID: 283"]
33921    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33922    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33923    #[doc = ""]
33924    #[doc = "ID: 284"]
33925    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33926    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33927    #[doc = ""]
33928    #[doc = "ID: 280"]
33929    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33930    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33931    #[doc = ""]
33932    #[doc = "ID: 282"]
33933    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33934    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33935    #[doc = ""]
33936    #[doc = "ID: 288"]
33937    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33938    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33939    #[doc = ""]
33940    #[doc = "ID: 287"]
33941    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33942    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33943    #[doc = ""]
33944    #[doc = "ID: 281"]
33945    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33946    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33947    #[doc = ""]
33948    #[doc = "ID: 33"]
33949    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33950    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33951    #[doc = ""]
33952    #[doc = "ID: 63"]
33953    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33954    #[doc = "Global position/attitude estimate from a vision source."]
33955    #[doc = ""]
33956    #[doc = "ID: 101"]
33957    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33958    #[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
33959    #[doc = ""]
33960    #[doc = "ID: 441"]
33961    GNSS_INTEGRITY(GNSS_INTEGRITY_DATA),
33962    #[doc = "Second GPS data."]
33963    #[doc = ""]
33964    #[doc = "ID: 124"]
33965    GPS2_RAW(GPS2_RAW_DATA),
33966    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33967    #[doc = ""]
33968    #[doc = "ID: 128"]
33969    GPS2_RTK(GPS2_RTK_DATA),
33970    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33971    #[doc = ""]
33972    #[doc = "ID: 49"]
33973    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33974    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33975    #[doc = ""]
33976    #[doc = "ID: 123"]
33977    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33978    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33979    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33980    #[doc = ""]
33981    #[doc = "ID: 232"]
33982    GPS_INPUT(GPS_INPUT_DATA),
33983    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33984    #[doc = ""]
33985    #[doc = "ID: 24"]
33986    GPS_RAW_INT(GPS_RAW_INT_DATA),
33987    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33988    #[doc = ""]
33989    #[doc = "ID: 233"]
33990    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33991    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33992    #[doc = ""]
33993    #[doc = "ID: 127"]
33994    GPS_RTK(GPS_RTK_DATA),
33995    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33996    #[doc = ""]
33997    #[doc = "ID: 25"]
33998    GPS_STATUS(GPS_STATUS_DATA),
33999    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
34000    #[doc = ""]
34001    #[doc = "ID: 415"]
34002    GROUP_END(GROUP_END_DATA),
34003    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
34004    #[doc = ""]
34005    #[doc = "ID: 414"]
34006    GROUP_START(GROUP_START_DATA),
34007    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34008    #[doc = ""]
34009    #[doc = "ID: 0"]
34010    HEARTBEAT(HEARTBEAT_DATA),
34011    #[doc = "The IMU readings in SI units in NED body frame."]
34012    #[doc = ""]
34013    #[doc = "ID: 105"]
34014    HIGHRES_IMU(HIGHRES_IMU_DATA),
34015    #[doc = "Message appropriate for high latency connections like Iridium."]
34016    #[doc = ""]
34017    #[doc = "ID: 234"]
34018    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34019    HIGH_LATENCY(HIGH_LATENCY_DATA),
34020    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34021    #[doc = ""]
34022    #[doc = "ID: 235"]
34023    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34024    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34025    #[doc = ""]
34026    #[doc = "ID: 93"]
34027    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34028    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34029    #[doc = ""]
34030    #[doc = "ID: 91"]
34031    HIL_CONTROLS(HIL_CONTROLS_DATA),
34032    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34033    #[doc = ""]
34034    #[doc = "ID: 113"]
34035    HIL_GPS(HIL_GPS_DATA),
34036    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34037    #[doc = ""]
34038    #[doc = "ID: 114"]
34039    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34040    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34041    #[doc = ""]
34042    #[doc = "ID: 92"]
34043    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34044    #[doc = "The IMU readings in SI units in NED body frame."]
34045    #[doc = ""]
34046    #[doc = "ID: 107"]
34047    HIL_SENSOR(HIL_SENSOR_DATA),
34048    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34049    #[doc = ""]
34050    #[doc = "ID: 90"]
34051    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34052    HIL_STATE(HIL_STATE_DATA),
34053    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34054    #[doc = ""]
34055    #[doc = "ID: 115"]
34056    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34057    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34058    #[doc = ""]
34059    #[doc = "ID: 242"]
34060    HOME_POSITION(HOME_POSITION_DATA),
34061    #[doc = "Temperature and humidity from hygrometer."]
34062    #[doc = ""]
34063    #[doc = "ID: 12920"]
34064    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34065    #[doc = "Illuminator status."]
34066    #[doc = ""]
34067    #[doc = "ID: 440"]
34068    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34069    #[doc = "Status of the Iridium SBD link."]
34070    #[doc = ""]
34071    #[doc = "ID: 335"]
34072    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34073    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34074    #[doc = ""]
34075    #[doc = "ID: 149"]
34076    LANDING_TARGET(LANDING_TARGET_DATA),
34077    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34078    #[doc = ""]
34079    #[doc = "ID: 8"]
34080    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34081    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34082    #[doc = ""]
34083    #[doc = "ID: 32"]
34084    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34085    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34086    #[doc = ""]
34087    #[doc = "ID: 64"]
34088    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34089    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34090    #[doc = ""]
34091    #[doc = "ID: 89"]
34092    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34093    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34094    #[doc = ""]
34095    #[doc = "ID: 268"]
34096    LOGGING_ACK(LOGGING_ACK_DATA),
34097    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34098    #[doc = ""]
34099    #[doc = "ID: 266"]
34100    LOGGING_DATA(LOGGING_DATA_DATA),
34101    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34102    #[doc = ""]
34103    #[doc = "ID: 267"]
34104    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34105    #[doc = "Reply to LOG_REQUEST_DATA."]
34106    #[doc = ""]
34107    #[doc = "ID: 120"]
34108    LOG_DATA(LOG_DATA_DATA),
34109    #[doc = "Reply to LOG_REQUEST_LIST."]
34110    #[doc = ""]
34111    #[doc = "ID: 118"]
34112    LOG_ENTRY(LOG_ENTRY_DATA),
34113    #[doc = "Erase all logs."]
34114    #[doc = ""]
34115    #[doc = "ID: 121"]
34116    LOG_ERASE(LOG_ERASE_DATA),
34117    #[doc = "Request a chunk of a log."]
34118    #[doc = ""]
34119    #[doc = "ID: 119"]
34120    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34121    #[doc = "Stop log transfer and resume normal logging."]
34122    #[doc = ""]
34123    #[doc = "ID: 122"]
34124    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34125    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34126    #[doc = ""]
34127    #[doc = "ID: 117"]
34128    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34129    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34130    #[doc = ""]
34131    #[doc = "ID: 192"]
34132    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34133    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34134    #[doc = ""]
34135    #[doc = "ID: 69"]
34136    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34137    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34138    #[doc = ""]
34139    #[doc = "ID: 81"]
34140    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34141    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34142    #[doc = ""]
34143    #[doc = "ID: 249"]
34144    MEMORY_VECT(MEMORY_VECT_DATA),
34145    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34146    #[doc = ""]
34147    #[doc = "ID: 244"]
34148    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34149    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34150    #[doc = ""]
34151    #[doc = "ID: 47"]
34152    MISSION_ACK(MISSION_ACK_DATA),
34153    #[doc = "Delete all mission items at once."]
34154    #[doc = ""]
34155    #[doc = "ID: 45"]
34156    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34157    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34158    #[doc = ""]
34159    #[doc = "ID: 44"]
34160    MISSION_COUNT(MISSION_COUNT_DATA),
34161    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34162    #[doc = ""]
34163    #[doc = "ID: 42"]
34164    MISSION_CURRENT(MISSION_CURRENT_DATA),
34165    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34166    #[doc = ""]
34167    #[doc = "ID: 39"]
34168    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34169    MISSION_ITEM(MISSION_ITEM_DATA),
34170    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34171    #[doc = ""]
34172    #[doc = "ID: 73"]
34173    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34174    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34175    #[doc = ""]
34176    #[doc = "ID: 46"]
34177    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34178    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34179    #[doc = ""]
34180    #[doc = "ID: 40"]
34181    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34182    MISSION_REQUEST(MISSION_REQUEST_DATA),
34183    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34184    #[doc = ""]
34185    #[doc = "ID: 51"]
34186    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34187    #[doc = "Request the overall list of mission items from the system/component."]
34188    #[doc = ""]
34189    #[doc = "ID: 43"]
34190    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34191    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34192    #[doc = ""]
34193    #[doc = "ID: 37"]
34194    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34195    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34196    #[doc = ""]
34197    #[doc = "ID: 41"]
34198    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34199    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34200    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34201    #[doc = ""]
34202    #[doc = "ID: 38"]
34203    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34204    #[doc = "Orientation of a mount."]
34205    #[doc = ""]
34206    #[doc = "ID: 265"]
34207    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34208    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34209    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34210    #[doc = ""]
34211    #[doc = "ID: 251"]
34212    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34213    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34214    #[doc = ""]
34215    #[doc = "ID: 252"]
34216    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34217    #[doc = "The state of the navigation and position controller."]
34218    #[doc = ""]
34219    #[doc = "ID: 62"]
34220    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34221    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34222    #[doc = ""]
34223    #[doc = "ID: 330"]
34224    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34225    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34226    #[doc = ""]
34227    #[doc = "ID: 331"]
34228    ODOMETRY(ODOMETRY_DATA),
34229    #[doc = "Hardware status sent by an onboard computer."]
34230    #[doc = ""]
34231    #[doc = "ID: 390"]
34232    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34233    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34234    #[doc = ""]
34235    #[doc = "ID: 12918"]
34236    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34237    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34238    #[doc = ""]
34239    #[doc = "ID: 12902"]
34240    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34241    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34242    #[doc = ""]
34243    #[doc = "ID: 12900"]
34244    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34245    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34246    #[doc = ""]
34247    #[doc = "ID: 12901"]
34248    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34249    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34250    #[doc = ""]
34251    #[doc = "ID: 12915"]
34252    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34253    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34254    #[doc = ""]
34255    #[doc = "ID: 12905"]
34256    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34257    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34258    #[doc = ""]
34259    #[doc = "ID: 12903"]
34260    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34261    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34262    #[doc = ""]
34263    #[doc = "ID: 12904"]
34264    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34265    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34266    #[doc = ""]
34267    #[doc = "ID: 12919"]
34268    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34269    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34270    #[doc = ""]
34271    #[doc = "ID: 100"]
34272    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34273    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34274    #[doc = ""]
34275    #[doc = "ID: 106"]
34276    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34277    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34278    #[doc = ""]
34279    #[doc = "ID: 360"]
34280    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34281    #[doc = "Response from a PARAM_EXT_SET message."]
34282    #[doc = ""]
34283    #[doc = "ID: 324"]
34284    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34285    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34286    #[doc = ""]
34287    #[doc = "ID: 321"]
34288    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34289    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34290    #[doc = ""]
34291    #[doc = "ID: 320"]
34292    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34293    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34294    #[doc = ""]
34295    #[doc = "ID: 323"]
34296    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34297    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34298    #[doc = ""]
34299    #[doc = "ID: 322"]
34300    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34301    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34302    #[doc = ""]
34303    #[doc = "ID: 50"]
34304    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34305    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34306    #[doc = ""]
34307    #[doc = "ID: 21"]
34308    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34309    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34310    #[doc = ""]
34311    #[doc = "ID: 20"]
34312    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34313    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34314    #[doc = ""]
34315    #[doc = "ID: 23"]
34316    PARAM_SET(PARAM_SET_DATA),
34317    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34318    #[doc = ""]
34319    #[doc = "ID: 22"]
34320    PARAM_VALUE(PARAM_VALUE_DATA),
34321    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34322    #[doc = ""]
34323    #[doc = "ID: 4"]
34324    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34325    PING(PING_DATA),
34326    #[doc = "Control vehicle tone generation (buzzer)."]
34327    #[doc = ""]
34328    #[doc = "ID: 258"]
34329    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34330    PLAY_TUNE(PLAY_TUNE_DATA),
34331    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34332    #[doc = ""]
34333    #[doc = "ID: 400"]
34334    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34335    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34336    #[doc = ""]
34337    #[doc = "ID: 87"]
34338    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34339    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34340    #[doc = ""]
34341    #[doc = "ID: 85"]
34342    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34343    #[doc = "Power supply status."]
34344    #[doc = ""]
34345    #[doc = "ID: 125"]
34346    POWER_STATUS(POWER_STATUS_DATA),
34347    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34348    #[doc = ""]
34349    #[doc = "ID: 300"]
34350    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34351    #[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
34352    #[doc = ""]
34353    #[doc = "ID: 420"]
34354    RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA),
34355    #[doc = "Status generated by radio and injected into MAVLink stream."]
34356    #[doc = ""]
34357    #[doc = "ID: 109"]
34358    RADIO_STATUS(RADIO_STATUS_DATA),
34359    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34360    #[doc = ""]
34361    #[doc = "ID: 27"]
34362    RAW_IMU(RAW_IMU_DATA),
34363    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34364    #[doc = ""]
34365    #[doc = "ID: 28"]
34366    RAW_PRESSURE(RAW_PRESSURE_DATA),
34367    #[doc = "RPM sensor data message."]
34368    #[doc = ""]
34369    #[doc = "ID: 339"]
34370    RAW_RPM(RAW_RPM_DATA),
34371    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34372    #[doc = ""]
34373    #[doc = "ID: 65"]
34374    RC_CHANNELS(RC_CHANNELS_DATA),
34375    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34376    #[doc = ""]
34377    #[doc = "ID: 70"]
34378    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34379    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34380    #[doc = ""]
34381    #[doc = "ID: 35"]
34382    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34383    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34384    #[doc = ""]
34385    #[doc = "ID: 34"]
34386    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34387    #[doc = "Request a data stream."]
34388    #[doc = ""]
34389    #[doc = "ID: 66"]
34390    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34391    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34392    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34393    #[doc = ""]
34394    #[doc = "ID: 412"]
34395    REQUEST_EVENT(REQUEST_EVENT_DATA),
34396    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34397    #[doc = ""]
34398    #[doc = "ID: 142"]
34399    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34400    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34401    #[doc = ""]
34402    #[doc = "ID: 413"]
34403    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34404    #[doc = "Read out the safety zone the MAV currently assumes."]
34405    #[doc = ""]
34406    #[doc = "ID: 55"]
34407    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34408    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34409    #[doc = ""]
34410    #[doc = "ID: 54"]
34411    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34412    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34413    #[doc = ""]
34414    #[doc = "ID: 26"]
34415    SCALED_IMU(SCALED_IMU_DATA),
34416    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34417    #[doc = ""]
34418    #[doc = "ID: 116"]
34419    SCALED_IMU2(SCALED_IMU2_DATA),
34420    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34421    #[doc = ""]
34422    #[doc = "ID: 129"]
34423    SCALED_IMU3(SCALED_IMU3_DATA),
34424    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34425    #[doc = ""]
34426    #[doc = "ID: 29"]
34427    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34428    #[doc = "Barometer readings for 2nd barometer."]
34429    #[doc = ""]
34430    #[doc = "ID: 137"]
34431    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34432    #[doc = "Barometer readings for 3rd barometer."]
34433    #[doc = ""]
34434    #[doc = "ID: 143"]
34435    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34436    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34437    #[doc = ""]
34438    #[doc = "ID: 126"]
34439    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34440    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
34441    #[doc = ""]
34442    #[doc = "ID: 36"]
34443    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34444    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
34445    #[doc = ""]
34446    #[doc = "ID: 256"]
34447    SETUP_SIGNING(SETUP_SIGNING_DATA),
34448    #[doc = "Set the vehicle attitude and body angular rates."]
34449    #[doc = ""]
34450    #[doc = "ID: 139"]
34451    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34452    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
34453    #[doc = ""]
34454    #[doc = "ID: 82"]
34455    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34456    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
34457    #[doc = ""]
34458    #[doc = "ID: 48"]
34459    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34460    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34461    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
34462    #[doc = ""]
34463    #[doc = "ID: 243"]
34464    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34465    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34466    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
34467    #[doc = ""]
34468    #[doc = "ID: 11"]
34469    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34470    SET_MODE(SET_MODE_DATA),
34471    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
34472    #[doc = ""]
34473    #[doc = "ID: 86"]
34474    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34475    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
34476    #[doc = ""]
34477    #[doc = "ID: 84"]
34478    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34479    #[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
34480    #[doc = ""]
34481    #[doc = "ID: 354"]
34482    SET_VELOCITY_LIMITS(SET_VELOCITY_LIMITS_DATA),
34483    #[doc = "Status of simulation environment, if used."]
34484    #[doc = ""]
34485    #[doc = "ID: 108"]
34486    SIM_STATE(SIM_STATE_DATA),
34487    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
34488    #[doc = ""]
34489    #[doc = "ID: 370"]
34490    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34491    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34492    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34493    #[doc = ""]
34494    #[doc = "ID: 253"]
34495    STATUSTEXT(STATUSTEXT_DATA),
34496    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34497    #[doc = ""]
34498    #[doc = "ID: 261"]
34499    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34500    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34501    #[doc = ""]
34502    #[doc = "ID: 401"]
34503    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34504    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34505    #[doc = ""]
34506    #[doc = "ID: 2"]
34507    SYSTEM_TIME(SYSTEM_TIME_DATA),
34508    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34509    #[doc = ""]
34510    #[doc = "ID: 1"]
34511    SYS_STATUS(SYS_STATUS_DATA),
34512    #[doc = "Current motion information from sensors on a target."]
34513    #[doc = ""]
34514    #[doc = "ID: 510"]
34515    TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA),
34516    #[doc = "The location of a target measured by MAV's onboard sensors."]
34517    #[doc = ""]
34518    #[doc = "ID: 511"]
34519    TARGET_RELATIVE(TARGET_RELATIVE_DATA),
34520    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34521    #[doc = ""]
34522    #[doc = "ID: 135"]
34523    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34524    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34525    #[doc = ""]
34526    #[doc = "ID: 134"]
34527    TERRAIN_DATA(TERRAIN_DATA_DATA),
34528    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34529    #[doc = ""]
34530    #[doc = "ID: 136"]
34531    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34532    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34533    #[doc = ""]
34534    #[doc = "ID: 133"]
34535    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34536    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34537    #[doc = ""]
34538    #[doc = "ID: 111"]
34539    TIMESYNC(TIMESYNC_DATA),
34540    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34541    #[doc = ""]
34542    #[doc = "ID: 380"]
34543    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34544    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34545    #[doc = ""]
34546    #[doc = "ID: 333"]
34547    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34548    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34549    #[doc = ""]
34550    #[doc = "ID: 332"]
34551    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34552    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34553    #[doc = ""]
34554    #[doc = "ID: 385"]
34555    TUNNEL(TUNNEL_DATA),
34556    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34557    #[doc = ""]
34558    #[doc = "ID: 311"]
34559    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34560    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34561    #[doc = ""]
34562    #[doc = "ID: 310"]
34563    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34564    #[doc = "The global position resulting from GPS and sensor fusion."]
34565    #[doc = ""]
34566    #[doc = "ID: 340"]
34567    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34568    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34569    #[doc = ""]
34570    #[doc = "ID: 248"]
34571    V2_EXTENSION(V2_EXTENSION_DATA),
34572    #[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
34573    #[doc = ""]
34574    #[doc = "ID: 355"]
34575    VELOCITY_LIMITS(VELOCITY_LIMITS_DATA),
34576    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34577    #[doc = ""]
34578    #[doc = "ID: 74"]
34579    VFR_HUD(VFR_HUD_DATA),
34580    #[doc = "Vibration levels and accelerometer clipping."]
34581    #[doc = ""]
34582    #[doc = "ID: 241"]
34583    VIBRATION(VIBRATION_DATA),
34584    #[doc = "Global position estimate from a Vicon motion system source."]
34585    #[doc = ""]
34586    #[doc = "ID: 104"]
34587    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34588    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34589    #[doc = ""]
34590    #[doc = "ID: 269"]
34591    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34592    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34593    #[doc = ""]
34594    #[doc = "ID: 270"]
34595    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34596    #[doc = "Local position/attitude estimate from a vision source."]
34597    #[doc = ""]
34598    #[doc = "ID: 102"]
34599    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34600    #[doc = "Speed estimate from a vision source."]
34601    #[doc = ""]
34602    #[doc = "ID: 103"]
34603    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34604    #[doc = "Cumulative distance traveled for each reported wheel."]
34605    #[doc = ""]
34606    #[doc = "ID: 9000"]
34607    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34608    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34609    #[doc = ""]
34610    #[doc = "ID: 299"]
34611    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34612    #[doc = "Winch status."]
34613    #[doc = ""]
34614    #[doc = "ID: 9005"]
34615    WINCH_STATUS(WINCH_STATUS_DATA),
34616    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34617    #[doc = ""]
34618    #[doc = "ID: 231"]
34619    WIND_COV(WIND_COV_DATA),
34620}
34621impl MavMessage {
34622    pub const fn all_ids() -> &'static [u32] {
34623        &[
34624            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34625            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34626            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34627            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34628            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34629            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34630            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34631            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34632            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34633            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34634            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34635            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34636            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34637            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34638            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34639            295u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32,
34640            330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 354u32,
34641            355u32, 360u32, 361u32, 369u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
34642            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
34643            412u32, 413u32, 414u32, 415u32, 420u32, 435u32, 436u32, 437u32, 440u32, 441u32, 510u32,
34644            511u32, 512u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32,
34645            12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
34646        ]
34647    }
34648}
34649impl Message for MavMessage {
34650    fn parse(
34651        version: MavlinkVersion,
34652        id: u32,
34653        payload: &[u8],
34654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34655        match id {
34656            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34657                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34658                    .map(Self::ACTUATOR_CONTROL_TARGET)
34659            }
34660            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34661                .map(Self::ACTUATOR_OUTPUT_STATUS),
34662            ADSB_VEHICLE_DATA::ID => {
34663                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34664            }
34665            AIRSPEED_DATA::ID => AIRSPEED_DATA::deser(version, payload).map(Self::AIRSPEED),
34666            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34667            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34668            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34669            ATTITUDE_QUATERNION_DATA::ID => {
34670                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34671            }
34672            ATTITUDE_QUATERNION_COV_DATA::ID => {
34673                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34674                    .map(Self::ATTITUDE_QUATERNION_COV)
34675            }
34676            ATTITUDE_TARGET_DATA::ID => {
34677                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34678            }
34679            ATT_POS_MOCAP_DATA::ID => {
34680                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34681            }
34682            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34683            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34684                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34685                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34686            }
34687            AUTOPILOT_VERSION_DATA::ID => {
34688                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34689            }
34690            AVAILABLE_MODES_DATA::ID => {
34691                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34692            }
34693            AVAILABLE_MODES_MONITOR_DATA::ID => {
34694                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34695                    .map(Self::AVAILABLE_MODES_MONITOR)
34696            }
34697            BATTERY_INFO_DATA::ID => {
34698                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34699            }
34700            BATTERY_STATUS_DATA::ID => {
34701                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34702            }
34703            BATTERY_STATUS_V2_DATA::ID => {
34704                BATTERY_STATUS_V2_DATA::deser(version, payload).map(Self::BATTERY_STATUS_V2)
34705            }
34706            BUTTON_CHANGE_DATA::ID => {
34707                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34708            }
34709            CAMERA_CAPTURE_STATUS_DATA::ID => {
34710                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34711            }
34712            CAMERA_FOV_STATUS_DATA::ID => {
34713                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34714            }
34715            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34716                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34717            }
34718            CAMERA_INFORMATION_DATA::ID => {
34719                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34720            }
34721            CAMERA_SETTINGS_DATA::ID => {
34722                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34723            }
34724            CAMERA_THERMAL_RANGE_DATA::ID => {
34725                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34726            }
34727            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34728                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34729                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34730            }
34731            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34732                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34733                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34734            }
34735            CAMERA_TRIGGER_DATA::ID => {
34736                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34737            }
34738            CANFD_FRAME_DATA::ID => {
34739                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34740            }
34741            CAN_FILTER_MODIFY_DATA::ID => {
34742                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34743            }
34744            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34745            CELLULAR_CONFIG_DATA::ID => {
34746                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34747            }
34748            CELLULAR_STATUS_DATA::ID => {
34749                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34750            }
34751            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34752                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34753                    .map(Self::CHANGE_OPERATOR_CONTROL)
34754            }
34755            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34756                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34757                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34758            }
34759            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34760            COMMAND_ACK_DATA::ID => {
34761                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34762            }
34763            COMMAND_CANCEL_DATA::ID => {
34764                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34765            }
34766            COMMAND_INT_DATA::ID => {
34767                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34768            }
34769            COMMAND_LONG_DATA::ID => {
34770                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34771            }
34772            COMPONENT_INFORMATION_DATA::ID => {
34773                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34774            }
34775            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34776                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34777                    .map(Self::COMPONENT_INFORMATION_BASIC)
34778            }
34779            COMPONENT_METADATA_DATA::ID => {
34780                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34781            }
34782            CONTROL_STATUS_DATA::ID => {
34783                CONTROL_STATUS_DATA::deser(version, payload).map(Self::CONTROL_STATUS)
34784            }
34785            CONTROL_SYSTEM_STATE_DATA::ID => {
34786                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34787            }
34788            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34789                .map(Self::CURRENT_EVENT_SEQUENCE),
34790            CURRENT_MODE_DATA::ID => {
34791                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34792            }
34793            DATA_STREAM_DATA::ID => {
34794                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34795            }
34796            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34797                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34798                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34799            }
34800            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34801            DEBUG_FLOAT_ARRAY_DATA::ID => {
34802                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34803            }
34804            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34805            DISTANCE_SENSOR_DATA::ID => {
34806                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34807            }
34808            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34809            ENCAPSULATED_DATA_DATA::ID => {
34810                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34811            }
34812            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34813            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34814            ESTIMATOR_STATUS_DATA::ID => {
34815                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34816            }
34817            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34818            EXTENDED_SYS_STATE_DATA::ID => {
34819                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34820            }
34821            FENCE_STATUS_DATA::ID => {
34822                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34823            }
34824            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => {
34825                FIGURE_EIGHT_EXECUTION_STATUS_DATA::deser(version, payload)
34826                    .map(Self::FIGURE_EIGHT_EXECUTION_STATUS)
34827            }
34828            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34829                .map(Self::FILE_TRANSFER_PROTOCOL),
34830            FLIGHT_INFORMATION_DATA::ID => {
34831                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34832            }
34833            FOLLOW_TARGET_DATA::ID => {
34834                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34835            }
34836            FUEL_STATUS_DATA::ID => {
34837                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34838            }
34839            GENERATOR_STATUS_DATA::ID => {
34840                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34841            }
34842            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34843                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34844                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34845            }
34846            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34847                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34848                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34849            }
34850            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34851                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34852                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34853            }
34854            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34855                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34856                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34857            }
34858            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34859                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34860                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34861            }
34862            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34863                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34864                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34865            }
34866            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34867                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34868                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34869            }
34870            GIMBAL_MANAGER_STATUS_DATA::ID => {
34871                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34872            }
34873            GLOBAL_POSITION_INT_DATA::ID => {
34874                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34875            }
34876            GLOBAL_POSITION_INT_COV_DATA::ID => {
34877                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34878                    .map(Self::GLOBAL_POSITION_INT_COV)
34879            }
34880            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34881                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34882                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34883            }
34884            GNSS_INTEGRITY_DATA::ID => {
34885                GNSS_INTEGRITY_DATA::deser(version, payload).map(Self::GNSS_INTEGRITY)
34886            }
34887            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34888            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34889            GPS_GLOBAL_ORIGIN_DATA::ID => {
34890                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34891            }
34892            GPS_INJECT_DATA_DATA::ID => {
34893                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34894            }
34895            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34896            GPS_RAW_INT_DATA::ID => {
34897                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34898            }
34899            GPS_RTCM_DATA_DATA::ID => {
34900                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34901            }
34902            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34903            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34904            GROUP_END_DATA::ID => GROUP_END_DATA::deser(version, payload).map(Self::GROUP_END),
34905            GROUP_START_DATA::ID => {
34906                GROUP_START_DATA::deser(version, payload).map(Self::GROUP_START)
34907            }
34908            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34909            HIGHRES_IMU_DATA::ID => {
34910                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34911            }
34912            HIGH_LATENCY_DATA::ID => {
34913                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34914            }
34915            HIGH_LATENCY2_DATA::ID => {
34916                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34917            }
34918            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34919                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34920            }
34921            HIL_CONTROLS_DATA::ID => {
34922                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34923            }
34924            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34925            HIL_OPTICAL_FLOW_DATA::ID => {
34926                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34927            }
34928            HIL_RC_INPUTS_RAW_DATA::ID => {
34929                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34930            }
34931            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34932            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34933            HIL_STATE_QUATERNION_DATA::ID => {
34934                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34935            }
34936            HOME_POSITION_DATA::ID => {
34937                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34938            }
34939            HYGROMETER_SENSOR_DATA::ID => {
34940                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34941            }
34942            ILLUMINATOR_STATUS_DATA::ID => {
34943                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34944            }
34945            ISBD_LINK_STATUS_DATA::ID => {
34946                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34947            }
34948            LANDING_TARGET_DATA::ID => {
34949                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34950            }
34951            LINK_NODE_STATUS_DATA::ID => {
34952                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34953            }
34954            LOCAL_POSITION_NED_DATA::ID => {
34955                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34956            }
34957            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34958                .map(Self::LOCAL_POSITION_NED_COV),
34959            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34960                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34961                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34962            }
34963            LOGGING_ACK_DATA::ID => {
34964                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34965            }
34966            LOGGING_DATA_DATA::ID => {
34967                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34968            }
34969            LOGGING_DATA_ACKED_DATA::ID => {
34970                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34971            }
34972            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34973            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34974            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34975            LOG_REQUEST_DATA_DATA::ID => {
34976                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34977            }
34978            LOG_REQUEST_END_DATA::ID => {
34979                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34980            }
34981            LOG_REQUEST_LIST_DATA::ID => {
34982                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34983            }
34984            MAG_CAL_REPORT_DATA::ID => {
34985                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34986            }
34987            MANUAL_CONTROL_DATA::ID => {
34988                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34989            }
34990            MANUAL_SETPOINT_DATA::ID => {
34991                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34992            }
34993            MEMORY_VECT_DATA::ID => {
34994                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34995            }
34996            MESSAGE_INTERVAL_DATA::ID => {
34997                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34998            }
34999            MISSION_ACK_DATA::ID => {
35000                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35001            }
35002            MISSION_CLEAR_ALL_DATA::ID => {
35003                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35004            }
35005            MISSION_COUNT_DATA::ID => {
35006                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35007            }
35008            MISSION_CURRENT_DATA::ID => {
35009                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35010            }
35011            MISSION_ITEM_DATA::ID => {
35012                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35013            }
35014            MISSION_ITEM_INT_DATA::ID => {
35015                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35016            }
35017            MISSION_ITEM_REACHED_DATA::ID => {
35018                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35019            }
35020            MISSION_REQUEST_DATA::ID => {
35021                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35022            }
35023            MISSION_REQUEST_INT_DATA::ID => {
35024                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35025            }
35026            MISSION_REQUEST_LIST_DATA::ID => {
35027                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35028            }
35029            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35030                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35031                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35032            }
35033            MISSION_SET_CURRENT_DATA::ID => {
35034                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35035            }
35036            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35037                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35038                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35039            }
35040            MOUNT_ORIENTATION_DATA::ID => {
35041                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35042            }
35043            NAMED_VALUE_FLOAT_DATA::ID => {
35044                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35045            }
35046            NAMED_VALUE_INT_DATA::ID => {
35047                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35048            }
35049            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35050                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35051            }
35052            OBSTACLE_DISTANCE_DATA::ID => {
35053                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35054            }
35055            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35056            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35057                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35058                    .map(Self::ONBOARD_COMPUTER_STATUS)
35059            }
35060            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35061                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35062                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35063            }
35064            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35065                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35066                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35067            }
35068            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35069                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35070            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35071                .map(Self::OPEN_DRONE_ID_LOCATION),
35072            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35073                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35074                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35075            }
35076            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35077                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35078                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35079            }
35080            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35081                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35082            }
35083            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35084                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35085            }
35086            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35087                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35088                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35089            }
35090            OPTICAL_FLOW_DATA::ID => {
35091                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35092            }
35093            OPTICAL_FLOW_RAD_DATA::ID => {
35094                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35095            }
35096            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35097                .map(Self::ORBIT_EXECUTION_STATUS),
35098            PARAM_EXT_ACK_DATA::ID => {
35099                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35100            }
35101            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35102                .map(Self::PARAM_EXT_REQUEST_LIST),
35103            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35104                .map(Self::PARAM_EXT_REQUEST_READ),
35105            PARAM_EXT_SET_DATA::ID => {
35106                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35107            }
35108            PARAM_EXT_VALUE_DATA::ID => {
35109                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35110            }
35111            PARAM_MAP_RC_DATA::ID => {
35112                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35113            }
35114            PARAM_REQUEST_LIST_DATA::ID => {
35115                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35116            }
35117            PARAM_REQUEST_READ_DATA::ID => {
35118                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35119            }
35120            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35121            PARAM_VALUE_DATA::ID => {
35122                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35123            }
35124            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35125            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35126            PLAY_TUNE_V2_DATA::ID => {
35127                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35128            }
35129            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35130                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35131                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35132            }
35133            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35134                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35135                    .map(Self::POSITION_TARGET_LOCAL_NED)
35136            }
35137            POWER_STATUS_DATA::ID => {
35138                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35139            }
35140            PROTOCOL_VERSION_DATA::ID => {
35141                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35142            }
35143            RADIO_RC_CHANNELS_DATA::ID => {
35144                RADIO_RC_CHANNELS_DATA::deser(version, payload).map(Self::RADIO_RC_CHANNELS)
35145            }
35146            RADIO_STATUS_DATA::ID => {
35147                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35148            }
35149            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35150            RAW_PRESSURE_DATA::ID => {
35151                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35152            }
35153            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35154            RC_CHANNELS_DATA::ID => {
35155                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35156            }
35157            RC_CHANNELS_OVERRIDE_DATA::ID => {
35158                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35159            }
35160            RC_CHANNELS_RAW_DATA::ID => {
35161                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35162            }
35163            RC_CHANNELS_SCALED_DATA::ID => {
35164                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35165            }
35166            REQUEST_DATA_STREAM_DATA::ID => {
35167                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35168            }
35169            REQUEST_EVENT_DATA::ID => {
35170                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35171            }
35172            RESOURCE_REQUEST_DATA::ID => {
35173                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35174            }
35175            RESPONSE_EVENT_ERROR_DATA::ID => {
35176                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35177            }
35178            SAFETY_ALLOWED_AREA_DATA::ID => {
35179                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35180            }
35181            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35182                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35183                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35184            }
35185            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35186            SCALED_IMU2_DATA::ID => {
35187                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35188            }
35189            SCALED_IMU3_DATA::ID => {
35190                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35191            }
35192            SCALED_PRESSURE_DATA::ID => {
35193                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35194            }
35195            SCALED_PRESSURE2_DATA::ID => {
35196                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35197            }
35198            SCALED_PRESSURE3_DATA::ID => {
35199                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35200            }
35201            SERIAL_CONTROL_DATA::ID => {
35202                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35203            }
35204            SERVO_OUTPUT_RAW_DATA::ID => {
35205                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35206            }
35207            SETUP_SIGNING_DATA::ID => {
35208                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35209            }
35210            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35211                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35212                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35213            }
35214            SET_ATTITUDE_TARGET_DATA::ID => {
35215                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35216            }
35217            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35218                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35219            }
35220            SET_HOME_POSITION_DATA::ID => {
35221                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35222            }
35223            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35224            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35225                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35226                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35227            }
35228            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35229                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35230                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35231            }
35232            SET_VELOCITY_LIMITS_DATA::ID => {
35233                SET_VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::SET_VELOCITY_LIMITS)
35234            }
35235            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35236            SMART_BATTERY_INFO_DATA::ID => {
35237                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35238            }
35239            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35240            STORAGE_INFORMATION_DATA::ID => {
35241                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35242            }
35243            SUPPORTED_TUNES_DATA::ID => {
35244                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35245            }
35246            SYSTEM_TIME_DATA::ID => {
35247                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35248            }
35249            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35250            TARGET_ABSOLUTE_DATA::ID => {
35251                TARGET_ABSOLUTE_DATA::deser(version, payload).map(Self::TARGET_ABSOLUTE)
35252            }
35253            TARGET_RELATIVE_DATA::ID => {
35254                TARGET_RELATIVE_DATA::deser(version, payload).map(Self::TARGET_RELATIVE)
35255            }
35256            TERRAIN_CHECK_DATA::ID => {
35257                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35258            }
35259            TERRAIN_DATA_DATA::ID => {
35260                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35261            }
35262            TERRAIN_REPORT_DATA::ID => {
35263                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35264            }
35265            TERRAIN_REQUEST_DATA::ID => {
35266                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35267            }
35268            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35269            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35270                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35271                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35272            }
35273            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35274                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35275                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35276            }
35277            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35278                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35279                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35280            }
35281            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35282            UAVCAN_NODE_INFO_DATA::ID => {
35283                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35284            }
35285            UAVCAN_NODE_STATUS_DATA::ID => {
35286                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35287            }
35288            UTM_GLOBAL_POSITION_DATA::ID => {
35289                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35290            }
35291            V2_EXTENSION_DATA::ID => {
35292                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35293            }
35294            VELOCITY_LIMITS_DATA::ID => {
35295                VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::VELOCITY_LIMITS)
35296            }
35297            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35298            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35299            VICON_POSITION_ESTIMATE_DATA::ID => {
35300                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35301                    .map(Self::VICON_POSITION_ESTIMATE)
35302            }
35303            VIDEO_STREAM_INFORMATION_DATA::ID => {
35304                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35305                    .map(Self::VIDEO_STREAM_INFORMATION)
35306            }
35307            VIDEO_STREAM_STATUS_DATA::ID => {
35308                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35309            }
35310            VISION_POSITION_ESTIMATE_DATA::ID => {
35311                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35312                    .map(Self::VISION_POSITION_ESTIMATE)
35313            }
35314            VISION_SPEED_ESTIMATE_DATA::ID => {
35315                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35316            }
35317            WHEEL_DISTANCE_DATA::ID => {
35318                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35319            }
35320            WIFI_CONFIG_AP_DATA::ID => {
35321                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35322            }
35323            WINCH_STATUS_DATA::ID => {
35324                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35325            }
35326            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35327            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35328        }
35329    }
35330    fn message_name(&self) -> &'static str {
35331        match self {
35332            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35333            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35334            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35335            Self::AIRSPEED(..) => AIRSPEED_DATA::NAME,
35336            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35337            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35338            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35339            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35340            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35341            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35342            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35343            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35344            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35345                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35346            }
35347            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35348            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35349            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35350            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35351            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35352            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::NAME,
35353            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35354            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35355            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35356            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35357            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35358            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35359            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35360            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35361            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35362            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35363            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35364            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35365            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35366            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35367            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35368            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35369            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35370            Self::COLLISION(..) => COLLISION_DATA::NAME,
35371            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35372            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35373            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35374            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35375            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35376            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35377            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35378            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::NAME,
35379            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35380            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35381            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35382            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35383            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35384            Self::DEBUG(..) => DEBUG_DATA::NAME,
35385            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35386            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35387            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35388            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
35389            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
35390            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
35391            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
35392            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
35393            Self::EVENT(..) => EVENT_DATA::NAME,
35394            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
35395            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
35396            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
35397            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
35398            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
35399            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
35400            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
35401            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
35402            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35403            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35404            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35405            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35406            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35407            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35408                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35409            }
35410            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35411            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35412            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35413            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35414            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35415            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::NAME,
35416            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35417            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35418            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35419            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35420            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35421            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35422            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35423            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35424            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35425            Self::GROUP_END(..) => GROUP_END_DATA::NAME,
35426            Self::GROUP_START(..) => GROUP_START_DATA::NAME,
35427            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35428            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35429            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35430            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35431            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35432            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35433            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35434            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35435            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35436            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35437            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35438            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35439            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35440            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35441            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35442            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35443            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35444            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35445            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35446            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35447            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35448                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35449            }
35450            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35451            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35452            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35453            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35454            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35455            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35456            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35457            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35458            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35459            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35460            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35461            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35462            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35463            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35464            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35465            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35466            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35467            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35468            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35469            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35470            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35471            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35472            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35473            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35474            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35475            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35476            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35477            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35478            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35479            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35480            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35481            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35482            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35483            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35484            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35485            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35486            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35487            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35488            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35489            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35490            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35491            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35492            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35493            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35494            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35495            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35496            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35497            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35498            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35499            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35500            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35501            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35502            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35503            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35504            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35505            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35506            Self::PING(..) => PING_DATA::NAME,
35507            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35508            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35509            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35510            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35511            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35512            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35513            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::NAME,
35514            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35515            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35516            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35517            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35518            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35519            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35520            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35521            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35522            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35523            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35524            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35525            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35526            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35527            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35528            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35529            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35530            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35531            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35532            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35533            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35534            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35535            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35536            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35537            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35538            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35539            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35540            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35541            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35542            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35543            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35544            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::NAME,
35545            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35546            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35547            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35548            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35549            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35550            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35551            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35552            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::NAME,
35553            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::NAME,
35554            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35555            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35556            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35557            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35558            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35559            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35560            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35561                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35562            }
35563            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35564                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35565            }
35566            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35567            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35568            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35569            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35570            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35571            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::NAME,
35572            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35573            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35574            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35575            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35576            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35577            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35578            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35579            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35580            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35581            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35582            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35583        }
35584    }
35585    fn message_id(&self) -> u32 {
35586        match self {
35587            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35588            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35589            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35590            Self::AIRSPEED(..) => AIRSPEED_DATA::ID,
35591            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35592            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35593            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35594            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35595            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35596            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35597            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35598            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35599            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35600                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35601            }
35602            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35603            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35604            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35605            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35606            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35607            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::ID,
35608            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35609            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35610            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35611            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35612            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35613            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35614            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35615            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35616            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35617            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35618            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35619            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35620            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35621            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35622            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35623            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35624            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35625            Self::COLLISION(..) => COLLISION_DATA::ID,
35626            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35627            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35628            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35629            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35630            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35631            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35632            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35633            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::ID,
35634            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35635            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35636            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35637            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35638            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35639            Self::DEBUG(..) => DEBUG_DATA::ID,
35640            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35641            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35642            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35643            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35644            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35645            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35646            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35647            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35648            Self::EVENT(..) => EVENT_DATA::ID,
35649            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35650            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35651            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
35652            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35653            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35654            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35655            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35656            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35657            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35658            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35659            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35660            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35661            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35662            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35663                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35664            }
35665            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35666            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35667            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35668            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35669            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35670            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::ID,
35671            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35672            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35673            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35674            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35675            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35676            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35677            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35678            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35679            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35680            Self::GROUP_END(..) => GROUP_END_DATA::ID,
35681            Self::GROUP_START(..) => GROUP_START_DATA::ID,
35682            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35683            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35684            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35685            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35686            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35687            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35688            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35689            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35690            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35691            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35692            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35693            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35694            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35695            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35696            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35697            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35698            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35699            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35700            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35701            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35702            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35703                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35704            }
35705            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35706            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35707            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35708            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35709            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35710            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35711            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35712            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35713            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35714            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35715            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35716            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35717            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35718            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35719            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35720            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35721            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35722            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35723            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35724            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35725            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35726            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35727            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35728            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35729            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35730            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35731            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35732            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35733            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35734            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35735            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35736            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35737            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35738            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35739            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35740            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35741            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35742            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35743            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35744            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35745            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35746            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35747            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35748            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35749            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35750            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35751            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35752            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35753            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35754            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35755            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35756            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35757            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35758            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35759            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35760            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35761            Self::PING(..) => PING_DATA::ID,
35762            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35763            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35764            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35765            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35766            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35767            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35768            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::ID,
35769            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35770            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35771            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35772            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35773            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35774            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35775            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35776            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35777            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35778            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35779            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35780            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35781            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35782            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35783            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35784            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35785            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35786            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35787            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35788            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35789            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35790            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35791            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35792            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35793            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35794            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35795            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35796            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35797            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35798            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35799            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::ID,
35800            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35801            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35802            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35803            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35804            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35805            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35806            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35807            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::ID,
35808            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::ID,
35809            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35810            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35811            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35812            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35813            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35814            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35815            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35816            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35817                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35818            }
35819            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35820            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35821            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35822            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35823            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35824            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::ID,
35825            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35826            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35827            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35828            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35829            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35830            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35831            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35832            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35833            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35834            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35835            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35836        }
35837    }
35838    fn message_id_from_name(name: &str) -> Option<u32> {
35839        match name {
35840            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35841            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35842            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35843            AIRSPEED_DATA::NAME => Some(AIRSPEED_DATA::ID),
35844            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35845            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35846            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35847            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35848            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35849            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35850            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35851            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35852            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35853                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35854            }
35855            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35856            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35857            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35858            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35859            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35860            BATTERY_STATUS_V2_DATA::NAME => Some(BATTERY_STATUS_V2_DATA::ID),
35861            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35862            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35863            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35864            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35865            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35866            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35867            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35868            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35869            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35870            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35871            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35872            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35873            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35874            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35875            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35876            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35877            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35878            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35879            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35880            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35881            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35882            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35883            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35884            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35885            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35886            CONTROL_STATUS_DATA::NAME => Some(CONTROL_STATUS_DATA::ID),
35887            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35888            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35889            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35890            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35891            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35892            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35893            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35894            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35895            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35896            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35897            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35898            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35899            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35900            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35901            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35902            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35903            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35904            FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME => {
35905                Some(FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID)
35906            }
35907            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35908            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35909            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35910            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35911            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35912            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35913                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35914            }
35915            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35916            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35917            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35918            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35919            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35920                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35921            }
35922            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35923            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35924            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35925            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35926            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35927                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35928            }
35929            GNSS_INTEGRITY_DATA::NAME => Some(GNSS_INTEGRITY_DATA::ID),
35930            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35931            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35932            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35933            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35934            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35935            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35936            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35937            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35938            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35939            GROUP_END_DATA::NAME => Some(GROUP_END_DATA::ID),
35940            GROUP_START_DATA::NAME => Some(GROUP_START_DATA::ID),
35941            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35942            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35943            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35944            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35945            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35946            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35947            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35948            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35949            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35950            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35951            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35952            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35953            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35954            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35955            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35956            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35957            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35958            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35959            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35960            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35961            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35962                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35963            }
35964            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35965            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35966            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35967            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35968            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35969            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35970            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35971            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35972            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35973            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35974            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35975            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35976            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35977            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35978            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35979            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35980            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35981            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35982            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35983            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35984            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35985            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35986            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35987            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35988            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35989            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35990            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35991            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35992            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35993            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35994            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35995            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35996            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35997            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35998            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35999            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36000            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36001            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36002            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36003            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36004            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36005            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36006            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36007            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36008            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36009            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36010            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36011            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36012            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36013            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36014            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36015            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36016            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36017            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36018            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36019            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36020            PING_DATA::NAME => Some(PING_DATA::ID),
36021            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36022            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36023            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36024            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36025            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36026            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36027            RADIO_RC_CHANNELS_DATA::NAME => Some(RADIO_RC_CHANNELS_DATA::ID),
36028            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36029            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36030            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36031            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36032            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36033            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36034            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36035            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36036            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36037            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36038            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36039            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36040            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36041            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36042            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36043            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36044            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36045            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36046            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36047            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36048            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36049            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36050            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36051            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36052            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36053            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36054            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36055            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36056            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36057                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36058            }
36059            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36060                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36061            }
36062            SET_VELOCITY_LIMITS_DATA::NAME => Some(SET_VELOCITY_LIMITS_DATA::ID),
36063            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36064            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36065            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36066            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36067            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36068            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36069            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36070            TARGET_ABSOLUTE_DATA::NAME => Some(TARGET_ABSOLUTE_DATA::ID),
36071            TARGET_RELATIVE_DATA::NAME => Some(TARGET_RELATIVE_DATA::ID),
36072            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36073            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36074            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36075            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36076            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36077            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36078            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36079                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36080            }
36081            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36082                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36083            }
36084            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36085            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36086            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36087            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36088            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36089            VELOCITY_LIMITS_DATA::NAME => Some(VELOCITY_LIMITS_DATA::ID),
36090            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36091            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36092            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36093            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36094            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36095            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36096            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36097            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36098            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36099            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36100            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36101            _ => None,
36102        }
36103    }
36104    fn default_message_from_id(id: u32) -> Option<Self> {
36105        match id {
36106            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36107                ACTUATOR_CONTROL_TARGET_DATA::default(),
36108            )),
36109            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36110                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36111            )),
36112            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36113            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::default())),
36114            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36115            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36116            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36117            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36118                ATTITUDE_QUATERNION_DATA::default(),
36119            )),
36120            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36121                ATTITUDE_QUATERNION_COV_DATA::default(),
36122            )),
36123            ATTITUDE_TARGET_DATA::ID => {
36124                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36125            }
36126            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36127            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36128            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36129                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36130                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36131                ))
36132            }
36133            AUTOPILOT_VERSION_DATA::ID => {
36134                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36135            }
36136            AVAILABLE_MODES_DATA::ID => {
36137                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36138            }
36139            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36140                AVAILABLE_MODES_MONITOR_DATA::default(),
36141            )),
36142            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36143            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36144            BATTERY_STATUS_V2_DATA::ID => {
36145                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::default()))
36146            }
36147            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36148            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36149                CAMERA_CAPTURE_STATUS_DATA::default(),
36150            )),
36151            CAMERA_FOV_STATUS_DATA::ID => {
36152                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36153            }
36154            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36155                CAMERA_IMAGE_CAPTURED_DATA::default(),
36156            )),
36157            CAMERA_INFORMATION_DATA::ID => {
36158                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36159            }
36160            CAMERA_SETTINGS_DATA::ID => {
36161                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36162            }
36163            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36164                CAMERA_THERMAL_RANGE_DATA::default(),
36165            )),
36166            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36167                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36168            )),
36169            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36170                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36171            )),
36172            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36173            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36174            CAN_FILTER_MODIFY_DATA::ID => {
36175                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36176            }
36177            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36178            CELLULAR_CONFIG_DATA::ID => {
36179                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36180            }
36181            CELLULAR_STATUS_DATA::ID => {
36182                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36183            }
36184            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36185                CHANGE_OPERATOR_CONTROL_DATA::default(),
36186            )),
36187            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36188                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36189            )),
36190            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36191            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36192            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36193            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36194            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36195            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36196                COMPONENT_INFORMATION_DATA::default(),
36197            )),
36198            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36199                COMPONENT_INFORMATION_BASIC_DATA::default(),
36200            )),
36201            COMPONENT_METADATA_DATA::ID => {
36202                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36203            }
36204            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::default())),
36205            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36206                CONTROL_SYSTEM_STATE_DATA::default(),
36207            )),
36208            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36209                CURRENT_EVENT_SEQUENCE_DATA::default(),
36210            )),
36211            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36212            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36213            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36214                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36215            )),
36216            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36217            DEBUG_FLOAT_ARRAY_DATA::ID => {
36218                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36219            }
36220            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36221            DISTANCE_SENSOR_DATA::ID => {
36222                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36223            }
36224            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36225            ENCAPSULATED_DATA_DATA::ID => {
36226                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36227            }
36228            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36229            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36230            ESTIMATOR_STATUS_DATA::ID => {
36231                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36232            }
36233            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36234            EXTENDED_SYS_STATE_DATA::ID => {
36235                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36236            }
36237            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36238            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36239                FIGURE_EIGHT_EXECUTION_STATUS_DATA::default(),
36240            )),
36241            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36242                FILE_TRANSFER_PROTOCOL_DATA::default(),
36243            )),
36244            FLIGHT_INFORMATION_DATA::ID => {
36245                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36246            }
36247            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36248            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36249            GENERATOR_STATUS_DATA::ID => {
36250                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36251            }
36252            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36253                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36254            )),
36255            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36256                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36257            )),
36258            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36259                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36260            )),
36261            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36262                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36263            )),
36264            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36265                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36266            )),
36267            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36268                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36269                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36270                ))
36271            }
36272            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36273                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36274            )),
36275            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36276                GIMBAL_MANAGER_STATUS_DATA::default(),
36277            )),
36278            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36279                GLOBAL_POSITION_INT_DATA::default(),
36280            )),
36281            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36282                GLOBAL_POSITION_INT_COV_DATA::default(),
36283            )),
36284            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36285                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36286                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36287                ))
36288            }
36289            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::default())),
36290            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36291            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36292            GPS_GLOBAL_ORIGIN_DATA::ID => {
36293                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36294            }
36295            GPS_INJECT_DATA_DATA::ID => {
36296                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36297            }
36298            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36299            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36300            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36301            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36302            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36303            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::default())),
36304            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::default())),
36305            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36306            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36307            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36308            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36309            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36310                HIL_ACTUATOR_CONTROLS_DATA::default(),
36311            )),
36312            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36313            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36314            HIL_OPTICAL_FLOW_DATA::ID => {
36315                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36316            }
36317            HIL_RC_INPUTS_RAW_DATA::ID => {
36318                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36319            }
36320            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36321            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36322            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36323                HIL_STATE_QUATERNION_DATA::default(),
36324            )),
36325            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36326            HYGROMETER_SENSOR_DATA::ID => {
36327                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36328            }
36329            ILLUMINATOR_STATUS_DATA::ID => {
36330                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36331            }
36332            ISBD_LINK_STATUS_DATA::ID => {
36333                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36334            }
36335            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36336            LINK_NODE_STATUS_DATA::ID => {
36337                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36338            }
36339            LOCAL_POSITION_NED_DATA::ID => {
36340                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36341            }
36342            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36343                LOCAL_POSITION_NED_COV_DATA::default(),
36344            )),
36345            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36346                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36347                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36348                ))
36349            }
36350            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36351            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36352            LOGGING_DATA_ACKED_DATA::ID => {
36353                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36354            }
36355            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36356            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36357            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36358            LOG_REQUEST_DATA_DATA::ID => {
36359                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36360            }
36361            LOG_REQUEST_END_DATA::ID => {
36362                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36363            }
36364            LOG_REQUEST_LIST_DATA::ID => {
36365                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36366            }
36367            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36368            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36369            MANUAL_SETPOINT_DATA::ID => {
36370                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36371            }
36372            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36373            MESSAGE_INTERVAL_DATA::ID => {
36374                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36375            }
36376            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36377            MISSION_CLEAR_ALL_DATA::ID => {
36378                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36379            }
36380            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36381            MISSION_CURRENT_DATA::ID => {
36382                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36383            }
36384            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36385            MISSION_ITEM_INT_DATA::ID => {
36386                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36387            }
36388            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36389                MISSION_ITEM_REACHED_DATA::default(),
36390            )),
36391            MISSION_REQUEST_DATA::ID => {
36392                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36393            }
36394            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36395                MISSION_REQUEST_INT_DATA::default(),
36396            )),
36397            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36398                MISSION_REQUEST_LIST_DATA::default(),
36399            )),
36400            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36401                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36402            )),
36403            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36404                MISSION_SET_CURRENT_DATA::default(),
36405            )),
36406            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36407                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36408            )),
36409            MOUNT_ORIENTATION_DATA::ID => {
36410                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36411            }
36412            NAMED_VALUE_FLOAT_DATA::ID => {
36413                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36414            }
36415            NAMED_VALUE_INT_DATA::ID => {
36416                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36417            }
36418            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36419                NAV_CONTROLLER_OUTPUT_DATA::default(),
36420            )),
36421            OBSTACLE_DISTANCE_DATA::ID => {
36422                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36423            }
36424            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36425            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36426                ONBOARD_COMPUTER_STATUS_DATA::default(),
36427            )),
36428            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36429                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36430            )),
36431            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36432                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36433            )),
36434            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36435                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36436            )),
36437            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36438                OPEN_DRONE_ID_LOCATION_DATA::default(),
36439            )),
36440            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36441                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36442            )),
36443            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36444                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36445            )),
36446            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36447                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36448            )),
36449            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36450                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36451            )),
36452            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36453                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36454            )),
36455            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36456            OPTICAL_FLOW_RAD_DATA::ID => {
36457                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36458            }
36459            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36460                ORBIT_EXECUTION_STATUS_DATA::default(),
36461            )),
36462            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36463            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36464                PARAM_EXT_REQUEST_LIST_DATA::default(),
36465            )),
36466            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36467                PARAM_EXT_REQUEST_READ_DATA::default(),
36468            )),
36469            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36470            PARAM_EXT_VALUE_DATA::ID => {
36471                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36472            }
36473            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36474            PARAM_REQUEST_LIST_DATA::ID => {
36475                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36476            }
36477            PARAM_REQUEST_READ_DATA::ID => {
36478                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36479            }
36480            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36481            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36482            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36483            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36484            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36485            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36486                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36487            )),
36488            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36489                POSITION_TARGET_LOCAL_NED_DATA::default(),
36490            )),
36491            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36492            PROTOCOL_VERSION_DATA::ID => {
36493                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36494            }
36495            RADIO_RC_CHANNELS_DATA::ID => {
36496                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::default()))
36497            }
36498            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36499            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36500            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36501            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36502            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36503            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36504                RC_CHANNELS_OVERRIDE_DATA::default(),
36505            )),
36506            RC_CHANNELS_RAW_DATA::ID => {
36507                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36508            }
36509            RC_CHANNELS_SCALED_DATA::ID => {
36510                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36511            }
36512            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36513                REQUEST_DATA_STREAM_DATA::default(),
36514            )),
36515            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36516            RESOURCE_REQUEST_DATA::ID => {
36517                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36518            }
36519            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36520                RESPONSE_EVENT_ERROR_DATA::default(),
36521            )),
36522            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36523                SAFETY_ALLOWED_AREA_DATA::default(),
36524            )),
36525            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36526                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36527            )),
36528            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36529            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36530            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36531            SCALED_PRESSURE_DATA::ID => {
36532                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36533            }
36534            SCALED_PRESSURE2_DATA::ID => {
36535                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36536            }
36537            SCALED_PRESSURE3_DATA::ID => {
36538                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36539            }
36540            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36541            SERVO_OUTPUT_RAW_DATA::ID => {
36542                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36543            }
36544            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36545            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36546                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36547            )),
36548            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36549                SET_ATTITUDE_TARGET_DATA::default(),
36550            )),
36551            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36552                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36553            )),
36554            SET_HOME_POSITION_DATA::ID => {
36555                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36556            }
36557            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36558            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36559                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36560            )),
36561            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36562                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36563            )),
36564            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
36565                SET_VELOCITY_LIMITS_DATA::default(),
36566            )),
36567            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36568            SMART_BATTERY_INFO_DATA::ID => {
36569                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36570            }
36571            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36572            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36573                STORAGE_INFORMATION_DATA::default(),
36574            )),
36575            SUPPORTED_TUNES_DATA::ID => {
36576                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36577            }
36578            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36579            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36580            TARGET_ABSOLUTE_DATA::ID => {
36581                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::default()))
36582            }
36583            TARGET_RELATIVE_DATA::ID => {
36584                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::default()))
36585            }
36586            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36587            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36588            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36589            TERRAIN_REQUEST_DATA::ID => {
36590                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36591            }
36592            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36593            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36594                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36595            )),
36596            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36597                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36598                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36599                ))
36600            }
36601            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36602                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36603                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36604                ))
36605            }
36606            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36607            UAVCAN_NODE_INFO_DATA::ID => {
36608                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36609            }
36610            UAVCAN_NODE_STATUS_DATA::ID => {
36611                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36612            }
36613            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36614                UTM_GLOBAL_POSITION_DATA::default(),
36615            )),
36616            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36617            VELOCITY_LIMITS_DATA::ID => {
36618                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::default()))
36619            }
36620            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36621            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36622            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36623                VICON_POSITION_ESTIMATE_DATA::default(),
36624            )),
36625            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36626                VIDEO_STREAM_INFORMATION_DATA::default(),
36627            )),
36628            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36629                VIDEO_STREAM_STATUS_DATA::default(),
36630            )),
36631            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36632                VISION_POSITION_ESTIMATE_DATA::default(),
36633            )),
36634            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36635                VISION_SPEED_ESTIMATE_DATA::default(),
36636            )),
36637            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36638            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36639            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36640            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36641            _ => None,
36642        }
36643    }
36644    #[cfg(feature = "arbitrary")]
36645    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36646        match id {
36647            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36648                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36649            )),
36650            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36651                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36652            )),
36653            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36654            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::random(rng))),
36655            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36656            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36657            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36658            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36659                ATTITUDE_QUATERNION_DATA::random(rng),
36660            )),
36661            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36662                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36663            )),
36664            ATTITUDE_TARGET_DATA::ID => {
36665                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36666            }
36667            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36668            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36669            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36670                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36671                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36672                ))
36673            }
36674            AUTOPILOT_VERSION_DATA::ID => {
36675                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36676            }
36677            AVAILABLE_MODES_DATA::ID => {
36678                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36679            }
36680            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36681                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36682            )),
36683            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36684            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36685            BATTERY_STATUS_V2_DATA::ID => {
36686                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::random(rng)))
36687            }
36688            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36689            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36690                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36691            )),
36692            CAMERA_FOV_STATUS_DATA::ID => {
36693                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36694            }
36695            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36696                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36697            )),
36698            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36699                CAMERA_INFORMATION_DATA::random(rng),
36700            )),
36701            CAMERA_SETTINGS_DATA::ID => {
36702                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36703            }
36704            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36705                CAMERA_THERMAL_RANGE_DATA::random(rng),
36706            )),
36707            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36708                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36709            )),
36710            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36711                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36712            )),
36713            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36714            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36715            CAN_FILTER_MODIFY_DATA::ID => {
36716                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36717            }
36718            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36719            CELLULAR_CONFIG_DATA::ID => {
36720                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36721            }
36722            CELLULAR_STATUS_DATA::ID => {
36723                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36724            }
36725            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36726                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36727            )),
36728            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36729                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36730            )),
36731            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36732            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36733            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36734            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36735            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36736            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36737                COMPONENT_INFORMATION_DATA::random(rng),
36738            )),
36739            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36740                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36741            )),
36742            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36743                COMPONENT_METADATA_DATA::random(rng),
36744            )),
36745            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::random(rng))),
36746            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36747                CONTROL_SYSTEM_STATE_DATA::random(rng),
36748            )),
36749            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36750                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36751            )),
36752            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36753            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36754            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36755                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36756            )),
36757            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36758            DEBUG_FLOAT_ARRAY_DATA::ID => {
36759                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36760            }
36761            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36762            DISTANCE_SENSOR_DATA::ID => {
36763                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36764            }
36765            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36766            ENCAPSULATED_DATA_DATA::ID => {
36767                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36768            }
36769            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36770            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36771            ESTIMATOR_STATUS_DATA::ID => {
36772                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36773            }
36774            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36775            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36776                EXTENDED_SYS_STATE_DATA::random(rng),
36777            )),
36778            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36779            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36780                FIGURE_EIGHT_EXECUTION_STATUS_DATA::random(rng),
36781            )),
36782            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36783                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36784            )),
36785            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36786                FLIGHT_INFORMATION_DATA::random(rng),
36787            )),
36788            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36789            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36790            GENERATOR_STATUS_DATA::ID => {
36791                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36792            }
36793            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36794                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36795            )),
36796            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36797                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36798            )),
36799            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36800                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36801            )),
36802            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36803                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36804            )),
36805            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36806                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36807            )),
36808            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36809                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36810                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36811                ))
36812            }
36813            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36814                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36815            )),
36816            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36817                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36818            )),
36819            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36820                GLOBAL_POSITION_INT_DATA::random(rng),
36821            )),
36822            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36823                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36824            )),
36825            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36826                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36827                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36828                ))
36829            }
36830            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::random(rng))),
36831            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36832            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36833            GPS_GLOBAL_ORIGIN_DATA::ID => {
36834                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36835            }
36836            GPS_INJECT_DATA_DATA::ID => {
36837                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36838            }
36839            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36840            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36841            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36842            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36843            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36844            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::random(rng))),
36845            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::random(rng))),
36846            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36847            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36848            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36849            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36850            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36851                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36852            )),
36853            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36854            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36855            HIL_OPTICAL_FLOW_DATA::ID => {
36856                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36857            }
36858            HIL_RC_INPUTS_RAW_DATA::ID => {
36859                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36860            }
36861            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36862            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36863            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36864                HIL_STATE_QUATERNION_DATA::random(rng),
36865            )),
36866            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36867            HYGROMETER_SENSOR_DATA::ID => {
36868                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36869            }
36870            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36871                ILLUMINATOR_STATUS_DATA::random(rng),
36872            )),
36873            ISBD_LINK_STATUS_DATA::ID => {
36874                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36875            }
36876            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36877            LINK_NODE_STATUS_DATA::ID => {
36878                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36879            }
36880            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36881                LOCAL_POSITION_NED_DATA::random(rng),
36882            )),
36883            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36884                LOCAL_POSITION_NED_COV_DATA::random(rng),
36885            )),
36886            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36887                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36888                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36889                ))
36890            }
36891            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36892            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36893            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36894                LOGGING_DATA_ACKED_DATA::random(rng),
36895            )),
36896            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36897            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36898            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36899            LOG_REQUEST_DATA_DATA::ID => {
36900                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36901            }
36902            LOG_REQUEST_END_DATA::ID => {
36903                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36904            }
36905            LOG_REQUEST_LIST_DATA::ID => {
36906                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36907            }
36908            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36909            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36910            MANUAL_SETPOINT_DATA::ID => {
36911                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36912            }
36913            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36914            MESSAGE_INTERVAL_DATA::ID => {
36915                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36916            }
36917            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36918            MISSION_CLEAR_ALL_DATA::ID => {
36919                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36920            }
36921            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36922            MISSION_CURRENT_DATA::ID => {
36923                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36924            }
36925            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36926            MISSION_ITEM_INT_DATA::ID => {
36927                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36928            }
36929            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36930                MISSION_ITEM_REACHED_DATA::random(rng),
36931            )),
36932            MISSION_REQUEST_DATA::ID => {
36933                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36934            }
36935            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36936                MISSION_REQUEST_INT_DATA::random(rng),
36937            )),
36938            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36939                MISSION_REQUEST_LIST_DATA::random(rng),
36940            )),
36941            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36942                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36943            )),
36944            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36945                MISSION_SET_CURRENT_DATA::random(rng),
36946            )),
36947            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36948                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36949            )),
36950            MOUNT_ORIENTATION_DATA::ID => {
36951                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36952            }
36953            NAMED_VALUE_FLOAT_DATA::ID => {
36954                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36955            }
36956            NAMED_VALUE_INT_DATA::ID => {
36957                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36958            }
36959            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36960                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36961            )),
36962            OBSTACLE_DISTANCE_DATA::ID => {
36963                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36964            }
36965            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36966            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36967                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36968            )),
36969            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36970                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36971            )),
36972            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36973                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36974            )),
36975            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36976                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36977            )),
36978            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36979                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36980            )),
36981            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36982                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36983            )),
36984            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36985                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36986            )),
36987            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36988                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36989            )),
36990            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36991                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36992            )),
36993            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36994                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36995            )),
36996            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36997            OPTICAL_FLOW_RAD_DATA::ID => {
36998                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36999            }
37000            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37001                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37002            )),
37003            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37004            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37005                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37006            )),
37007            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37008                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37009            )),
37010            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37011            PARAM_EXT_VALUE_DATA::ID => {
37012                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37013            }
37014            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37015            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37016                PARAM_REQUEST_LIST_DATA::random(rng),
37017            )),
37018            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37019                PARAM_REQUEST_READ_DATA::random(rng),
37020            )),
37021            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37022            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37023            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37024            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37025            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37026            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37027                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37028            )),
37029            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37030                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37031            )),
37032            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37033            PROTOCOL_VERSION_DATA::ID => {
37034                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37035            }
37036            RADIO_RC_CHANNELS_DATA::ID => {
37037                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::random(rng)))
37038            }
37039            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37040            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37041            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37042            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37043            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37044            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37045                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37046            )),
37047            RC_CHANNELS_RAW_DATA::ID => {
37048                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37049            }
37050            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37051                RC_CHANNELS_SCALED_DATA::random(rng),
37052            )),
37053            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37054                REQUEST_DATA_STREAM_DATA::random(rng),
37055            )),
37056            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37057            RESOURCE_REQUEST_DATA::ID => {
37058                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37059            }
37060            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37061                RESPONSE_EVENT_ERROR_DATA::random(rng),
37062            )),
37063            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37064                SAFETY_ALLOWED_AREA_DATA::random(rng),
37065            )),
37066            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37067                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37068            )),
37069            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37070            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37071            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37072            SCALED_PRESSURE_DATA::ID => {
37073                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37074            }
37075            SCALED_PRESSURE2_DATA::ID => {
37076                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37077            }
37078            SCALED_PRESSURE3_DATA::ID => {
37079                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37080            }
37081            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37082            SERVO_OUTPUT_RAW_DATA::ID => {
37083                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37084            }
37085            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37086            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37087                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37088            )),
37089            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37090                SET_ATTITUDE_TARGET_DATA::random(rng),
37091            )),
37092            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37093                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37094            )),
37095            SET_HOME_POSITION_DATA::ID => {
37096                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37097            }
37098            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37099            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37100                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37101            )),
37102            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37103                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37104            )),
37105            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
37106                SET_VELOCITY_LIMITS_DATA::random(rng),
37107            )),
37108            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37109            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37110                SMART_BATTERY_INFO_DATA::random(rng),
37111            )),
37112            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37113            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37114                STORAGE_INFORMATION_DATA::random(rng),
37115            )),
37116            SUPPORTED_TUNES_DATA::ID => {
37117                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37118            }
37119            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37120            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37121            TARGET_ABSOLUTE_DATA::ID => {
37122                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::random(rng)))
37123            }
37124            TARGET_RELATIVE_DATA::ID => {
37125                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::random(rng)))
37126            }
37127            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37128            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37129            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37130            TERRAIN_REQUEST_DATA::ID => {
37131                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37132            }
37133            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37134            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37135                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37136            )),
37137            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37138                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37139                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37140                ))
37141            }
37142            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37143                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37144                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37145                ))
37146            }
37147            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37148            UAVCAN_NODE_INFO_DATA::ID => {
37149                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37150            }
37151            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37152                UAVCAN_NODE_STATUS_DATA::random(rng),
37153            )),
37154            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37155                UTM_GLOBAL_POSITION_DATA::random(rng),
37156            )),
37157            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37158            VELOCITY_LIMITS_DATA::ID => {
37159                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::random(rng)))
37160            }
37161            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37162            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37163            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37164                VICON_POSITION_ESTIMATE_DATA::random(rng),
37165            )),
37166            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37167                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37168            )),
37169            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37170                VIDEO_STREAM_STATUS_DATA::random(rng),
37171            )),
37172            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37173                VISION_POSITION_ESTIMATE_DATA::random(rng),
37174            )),
37175            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37176                VISION_SPEED_ESTIMATE_DATA::random(rng),
37177            )),
37178            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37179            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37180            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37181            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37182            _ => None,
37183        }
37184    }
37185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37186        match self {
37187            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37188            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37189            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37190            Self::AIRSPEED(body) => body.ser(version, bytes),
37191            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37192            Self::ALTITUDE(body) => body.ser(version, bytes),
37193            Self::ATTITUDE(body) => body.ser(version, bytes),
37194            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37195            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37196            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37197            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37198            Self::AUTH_KEY(body) => body.ser(version, bytes),
37199            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37200            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37201            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37202            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37203            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37204            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37205            Self::BATTERY_STATUS_V2(body) => body.ser(version, bytes),
37206            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37207            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37208            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37209            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37210            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37211            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37212            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37213            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37214            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37215            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37216            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37217            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37218            Self::CAN_FRAME(body) => body.ser(version, bytes),
37219            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37220            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37221            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37222            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37223            Self::COLLISION(body) => body.ser(version, bytes),
37224            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37225            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37226            Self::COMMAND_INT(body) => body.ser(version, bytes),
37227            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37228            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37229            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37230            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37231            Self::CONTROL_STATUS(body) => body.ser(version, bytes),
37232            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37233            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37234            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37235            Self::DATA_STREAM(body) => body.ser(version, bytes),
37236            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37237            Self::DEBUG(body) => body.ser(version, bytes),
37238            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37239            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37240            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37241            Self::EFI_STATUS(body) => body.ser(version, bytes),
37242            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37243            Self::ESC_INFO(body) => body.ser(version, bytes),
37244            Self::ESC_STATUS(body) => body.ser(version, bytes),
37245            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37246            Self::EVENT(body) => body.ser(version, bytes),
37247            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37248            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37249            Self::FIGURE_EIGHT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37250            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37251            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37252            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37253            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37254            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37255            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37256            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37257            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37258            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37259            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37260            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37261            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37262            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37263            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37264            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37265            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37266            Self::GNSS_INTEGRITY(body) => body.ser(version, bytes),
37267            Self::GPS2_RAW(body) => body.ser(version, bytes),
37268            Self::GPS2_RTK(body) => body.ser(version, bytes),
37269            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37270            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37271            Self::GPS_INPUT(body) => body.ser(version, bytes),
37272            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37273            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37274            Self::GPS_RTK(body) => body.ser(version, bytes),
37275            Self::GPS_STATUS(body) => body.ser(version, bytes),
37276            Self::GROUP_END(body) => body.ser(version, bytes),
37277            Self::GROUP_START(body) => body.ser(version, bytes),
37278            Self::HEARTBEAT(body) => body.ser(version, bytes),
37279            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37280            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37281            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37282            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37283            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37284            Self::HIL_GPS(body) => body.ser(version, bytes),
37285            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37286            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37287            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37288            Self::HIL_STATE(body) => body.ser(version, bytes),
37289            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37290            Self::HOME_POSITION(body) => body.ser(version, bytes),
37291            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37292            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37293            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37294            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37295            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37296            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37297            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37298            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37299            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37300            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37301            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37302            Self::LOG_DATA(body) => body.ser(version, bytes),
37303            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37304            Self::LOG_ERASE(body) => body.ser(version, bytes),
37305            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37306            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37307            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37308            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37309            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37310            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37311            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37312            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37313            Self::MISSION_ACK(body) => body.ser(version, bytes),
37314            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37315            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37316            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37317            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37318            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37319            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37320            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37321            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37322            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37323            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37324            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37325            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37326            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37327            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37328            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37329            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37330            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37331            Self::ODOMETRY(body) => body.ser(version, bytes),
37332            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37333            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37334            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37335            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37336            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37337            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37338            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37339            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37340            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37341            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37342            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37343            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37344            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37345            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37346            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37347            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37348            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37349            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37350            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37351            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37352            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37353            Self::PARAM_SET(body) => body.ser(version, bytes),
37354            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37355            Self::PING(body) => body.ser(version, bytes),
37356            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37357            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37358            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37359            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37360            Self::POWER_STATUS(body) => body.ser(version, bytes),
37361            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37362            Self::RADIO_RC_CHANNELS(body) => body.ser(version, bytes),
37363            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37364            Self::RAW_IMU(body) => body.ser(version, bytes),
37365            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37366            Self::RAW_RPM(body) => body.ser(version, bytes),
37367            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37368            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37369            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37370            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37371            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37372            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37373            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37374            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37375            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37376            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37377            Self::SCALED_IMU(body) => body.ser(version, bytes),
37378            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37379            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37380            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37381            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37382            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37383            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37384            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37385            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37386            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37387            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37388            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37389            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37390            Self::SET_MODE(body) => body.ser(version, bytes),
37391            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37392            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37393            Self::SET_VELOCITY_LIMITS(body) => body.ser(version, bytes),
37394            Self::SIM_STATE(body) => body.ser(version, bytes),
37395            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37396            Self::STATUSTEXT(body) => body.ser(version, bytes),
37397            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37398            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37399            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37400            Self::SYS_STATUS(body) => body.ser(version, bytes),
37401            Self::TARGET_ABSOLUTE(body) => body.ser(version, bytes),
37402            Self::TARGET_RELATIVE(body) => body.ser(version, bytes),
37403            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37404            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37405            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37406            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37407            Self::TIMESYNC(body) => body.ser(version, bytes),
37408            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37409            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37410            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37411            Self::TUNNEL(body) => body.ser(version, bytes),
37412            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37413            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37414            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37415            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37416            Self::VELOCITY_LIMITS(body) => body.ser(version, bytes),
37417            Self::VFR_HUD(body) => body.ser(version, bytes),
37418            Self::VIBRATION(body) => body.ser(version, bytes),
37419            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37420            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37421            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37422            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37423            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37424            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37425            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37426            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37427            Self::WIND_COV(body) => body.ser(version, bytes),
37428        }
37429    }
37430    fn extra_crc(id: u32) -> u8 {
37431        match id {
37432            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37433            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37434            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37435            AIRSPEED_DATA::ID => AIRSPEED_DATA::EXTRA_CRC,
37436            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37437            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37438            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37439            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37440            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37441            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37442            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37443            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37444            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37445                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37446            }
37447            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37448            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37449            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37450            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37451            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37452            BATTERY_STATUS_V2_DATA::ID => BATTERY_STATUS_V2_DATA::EXTRA_CRC,
37453            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37454            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37455            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37456            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37457            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37458            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37459            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37460            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37461            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37462            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37463            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37464            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37465            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37466            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37467            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37468            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37469            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37470            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37471            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37472            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37473            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37474            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37475            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37476            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37477            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37478            CONTROL_STATUS_DATA::ID => CONTROL_STATUS_DATA::EXTRA_CRC,
37479            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37480            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37481            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37482            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37483            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37484            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37485            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37486            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37487            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37488            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37489            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37490            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37491            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37492            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37493            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37494            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37495            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37496            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => FIGURE_EIGHT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37497            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37498            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37499            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37500            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37501            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37502            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37503            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37504            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37505            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37506            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37507            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37508                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37509            }
37510            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37511            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37512            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37513            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37514            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37515                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37516            }
37517            GNSS_INTEGRITY_DATA::ID => GNSS_INTEGRITY_DATA::EXTRA_CRC,
37518            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37519            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37520            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37521            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37522            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37523            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37524            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37525            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37526            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37527            GROUP_END_DATA::ID => GROUP_END_DATA::EXTRA_CRC,
37528            GROUP_START_DATA::ID => GROUP_START_DATA::EXTRA_CRC,
37529            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37530            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37531            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37532            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37533            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37534            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37535            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37536            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37537            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37538            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37539            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37540            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37541            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37542            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37543            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37544            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37545            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37546            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37547            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37548            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37549            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37550                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37551            }
37552            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37553            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37554            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37555            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37556            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37557            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37558            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37559            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37560            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37561            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37562            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37563            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37564            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37565            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37566            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37567            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37568            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37569            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37570            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37571            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37572            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37573            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37574            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37575            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37576            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37577            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37578            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37579            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37580            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37581            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37582            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37583            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37584            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37585            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37586            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37587            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37588            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37589            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37590            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37591            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37592            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37593            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37594            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37595            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37596            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37597            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37598            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37599            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37600            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37601            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37602            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37603            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37604            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37605            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37606            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37607            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37608            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37609            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37610            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37611            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37612            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37613            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37614            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37615            RADIO_RC_CHANNELS_DATA::ID => RADIO_RC_CHANNELS_DATA::EXTRA_CRC,
37616            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37617            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37618            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37619            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37620            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37621            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37622            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37623            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37624            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37625            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37626            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37627            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37628            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37629            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37630            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37631            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37632            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37633            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37634            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37635            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37636            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37637            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37638            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37639            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37640            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37641            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37642            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37643            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37644            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37645                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37646            }
37647            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37648            SET_VELOCITY_LIMITS_DATA::ID => SET_VELOCITY_LIMITS_DATA::EXTRA_CRC,
37649            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37650            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37651            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37652            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37653            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37654            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37655            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37656            TARGET_ABSOLUTE_DATA::ID => TARGET_ABSOLUTE_DATA::EXTRA_CRC,
37657            TARGET_RELATIVE_DATA::ID => TARGET_RELATIVE_DATA::EXTRA_CRC,
37658            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37659            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37660            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37661            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37662            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37663            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37664            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37665                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37666            }
37667            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37668                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37669            }
37670            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37671            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37672            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37673            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37674            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37675            VELOCITY_LIMITS_DATA::ID => VELOCITY_LIMITS_DATA::EXTRA_CRC,
37676            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37677            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37678            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37679            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37680            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37681            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37682            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37683            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37684            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37685            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37686            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37687            _ => 0,
37688        }
37689    }
37690    fn target_system_id(&self) -> Option<u8> {
37691        match self {
37692            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37693            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37694            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37695            Self::CAN_FRAME(inner) => Some(inner.target_system),
37696            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37697            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37698            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37699            Self::COMMAND_INT(inner) => Some(inner.target_system),
37700            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37701            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37702            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37703            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37704            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37705            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37706            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37707            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37708            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37709            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37710            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37711            Self::LOG_ERASE(inner) => Some(inner.target_system),
37712            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37713            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37714            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37715            Self::MISSION_ACK(inner) => Some(inner.target_system),
37716            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37717            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37718            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37719            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37720            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37721            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37722            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37723            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37724            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37725            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37726            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37727            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37728            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37729            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37730            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37731            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37732            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37733            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37734            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37735            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37736            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37737            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37738            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37739            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37740            Self::PARAM_SET(inner) => Some(inner.target_system),
37741            Self::PING(inner) => Some(inner.target_system),
37742            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37743            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37744            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_system),
37745            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37746            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37747            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37748            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37749            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37750            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37751            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37752            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37753            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37754            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37755            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37756            Self::SET_MODE(inner) => Some(inner.target_system),
37757            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37758            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37759            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_system),
37760            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37761            Self::TIMESYNC(inner) => Some(inner.target_system),
37762            Self::TUNNEL(inner) => Some(inner.target_system),
37763            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37764            _ => None,
37765        }
37766    }
37767    fn target_component_id(&self) -> Option<u8> {
37768        match self {
37769            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37770            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37771            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37772            Self::CAN_FRAME(inner) => Some(inner.target_component),
37773            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37774            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37775            Self::COMMAND_INT(inner) => Some(inner.target_component),
37776            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37777            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37778            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37779            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37780            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37781            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37782            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37783            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37784            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37785            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37786            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37787            Self::LOG_ERASE(inner) => Some(inner.target_component),
37788            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37789            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37790            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37791            Self::MISSION_ACK(inner) => Some(inner.target_component),
37792            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37793            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37794            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37795            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37796            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37797            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37798            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37799            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37800            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37801            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37802            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37803            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37804            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37805            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37806            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37807            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37808            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37809            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37810            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37811            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37812            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37813            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37814            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37815            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37816            Self::PARAM_SET(inner) => Some(inner.target_component),
37817            Self::PING(inner) => Some(inner.target_component),
37818            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37819            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37820            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_component),
37821            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37822            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37823            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37824            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37825            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37826            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37827            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37828            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37829            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37830            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37831            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37832            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_component),
37833            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37834            Self::TIMESYNC(inner) => Some(inner.target_component),
37835            Self::TUNNEL(inner) => Some(inner.target_component),
37836            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37837            _ => None,
37838        }
37839    }
37840}